Fix crash when uploading file
This commit is contained in:
@@ -2000,7 +2000,8 @@ function uploadFile(appId, sourceFilePath, destFilePath, callback) {
|
||||
|
||||
const done = once(function (error) {
|
||||
safe.fs.unlinkSync(sourceFilePath); // remove file in /tmp
|
||||
callback(new BoxError(BoxError.FS_ERROR, error.message)); // blame it on filesystem for now
|
||||
if (error) return callback(new BoxError(BoxError.FS_ERROR, error.message)); // blame it on filesystem for now
|
||||
callback(null);
|
||||
});
|
||||
|
||||
// the built-in bash printf understands "%q" but not /usr/bin/printf.
|
||||
|
||||
Reference in New Issue
Block a user