always using updater cache

pull/1705/head
antelle 2021-01-09 13:21:37 +01:00
parent 2900fe07bf
commit 8ee63ccc24
No known key found for this signature in database
GPG Key ID: 63C9777AAB7C563C
1 changed files with 6 additions and 12 deletions

View File

@ -187,12 +187,11 @@ const Updater = {
}
const updateUrlBasePath = Links.UpdateBasePath.replace('{ver}', ver);
const updateAssetUrl = updateUrlBasePath + updateAssetName;
const useCache = !startedByUser;
Transport.httpGet({
url: updateAssetUrl,
file: updateAssetName,
cleanupOldFiles: true,
cache: useCache,
cache: true,
success: (assetFilePath) => {
logger.info('Downloading update signatures');
Transport.httpGet({
@ -200,20 +199,15 @@ const Updater = {
text: true,
file: updateAssetName + '.sign',
cleanupOldFiles: true,
cache: useCache,
cache: true,
success: (assetFileSignaturePath) => {
this.verifySignature(assetFilePath, updateAssetName, (err, valid) => {
if (err) {
if (err || !valid) {
UpdateModel.set({
updateStatus: 'error',
updateError: 'Error verifying update signature'
});
return;
}
if (!valid) {
UpdateModel.set({
updateStatus: 'error',
updateError: 'Invalid update signature'
updateError: err
? 'Error verifying update signature'
: 'Invalid update signature'
});
Launcher.deleteFile(assetFilePath);
Launcher.deleteFile(assetFileSignaturePath);