Skip to content

Commit

Permalink
expressjs#30 fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
hacksparrow committed Jul 13, 2014
1 parent dd2e601 commit 12db702
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ module.exports = function(options) {
// defines is processing a new file
fileCount++;

ext = '.' + filename.split('.').slice(-1)[0];
if (filename.indexOf('.') > 0) { ext = '.' + filename.split('.').slice(-1)[0]; }
else { ext = ''; }

newFilename = rename(fieldname, filename.replace(ext, '')) + ext;
newFilePath = path.join(dest, newFilename);

Expand Down

0 comments on commit 12db702

Please sign in to comment.