fix #1078: updater hanged on "extracting files"

This commit is contained in:
antelle 2019-01-06 19:20:56 +01:00
parent 72b1ea7f5d
commit 51bc308fa8
4 changed files with 5 additions and 4 deletions

View File

@ -78,7 +78,7 @@ const Launcher = {
this.req('fs').exists(path, callback);
},
deleteFile: function(path, callback) {
this.req('fs').unlink(path, callback);
this.req('fs').unlink(path, callback || _.noop);
},
statFile: function(path, callback) {
this.req('fs').stat(path, (err, stats) => callback(stats, err));

View File

@ -18,7 +18,7 @@ const Transport = {
fs.unlinkSync(tmpFile);
}
} catch (e) {
fs.unlink(tmpFile);
fs.unlink(tmpFile, _.noop);
}
}
}
@ -74,7 +74,7 @@ const Transport = {
}).on('error', e => {
logger.error('Cannot GET ' + config.url, e);
if (tmpFile) {
fs.unlink(tmpFile);
fs.unlink(tmpFile, _.noop);
}
config.error(e);
});

View File

@ -208,7 +208,7 @@ const Updater = {
if (err) {
return cb(err);
}
Launcher.req('fs').unlink(updateFile);
Launcher.deleteFile(updateFile);
cb();
});
});

View File

@ -2,6 +2,7 @@ Release notes
-------------
##### v1.7.2 (2019-01-07)
`-` fix #1079: error launching another instance
`-` fix #1078: updater hanged on "extracting files"
##### v1.7.1 (2019-01-06)
`-` fix #1077: broken auto-type