Handle error in uploadFile

This commit is contained in:
Girish Ramakrishnan
2017-11-15 18:45:17 -08:00
parent 4d6616930a
commit 3d7094bf28
+2 -2
View File
@@ -1022,7 +1022,7 @@ function autoupdateApps(updateInfo, auditSource, callback) { // updateInfo is {
if (error) {
debug('Cannot autoupdate app %s : %s', appId, error.message);
return iteratorDone();
}
}
error = canAutoupdateApp(app, updateInfo[appId].manifest);
if (error) {
@@ -1193,7 +1193,7 @@ function uploadFile(appId, sourceFilePath, destFilePath, callback) {
if (error) return callback(error);
var readFile = fs.createReadStream(sourceFilePath);
readFile.on('error', console.error);
readFile.on('error', callback);
readFile.pipe(stream);