Fix various minor mistakes

This commit is contained in:
Bryan Ashby 2019-11-08 19:20:14 -07:00
parent 351ae52776
commit c9ff904b2b
No known key found for this signature in database
GPG key ID: B49EB437951D2542
7 changed files with 17 additions and 18 deletions

View file

@ -387,13 +387,11 @@ exports.getModule = class UploadModule extends MenuModule {
self.client.log.error(
'Failed moving physical upload file', { error : err.message, fileName : newEntry.fileName, source : src, dest : dst }
);
if(!err && dst !== finalPath) {
// name changed; ajust before persist
newEntry.fileName = paths.basename(finalPath);
}
return nextEntry(null); // still try next file
} else if(dst !== finalPath)
{
// name changed; adjust before persist
newEntry.fileName = paths.basename(finalPath);
}
self.client.log.debug('Moved upload to area', { path : finalPath } );