Remove failed updater on double failure
Co-authored-by: Scott Nonnenberg <scott@signal.org>
This commit is contained in:
parent
3e007852d5
commit
2c0ccb2e36
1 changed files with 11 additions and 0 deletions
|
@ -722,6 +722,17 @@ export abstract class Updater {
|
|||
'downloadUpdate: Failed to restore from backup folder, ignoring',
|
||||
Errors.toLogFormat(restoreError)
|
||||
);
|
||||
|
||||
// If not possible - at least clean up
|
||||
try {
|
||||
await deleteTempDir(this.logger, restoreDir);
|
||||
} catch (cleanupError) {
|
||||
this.logger.warn(
|
||||
'downloadUpdate: Failed to remove backup folder after ' +
|
||||
'failed restore, ignoring',
|
||||
Errors.toLogFormat(cleanupError)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
this.logger.warn(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue