Fix #835 App should now roll back an addon update if unzipping fails

This commit is contained in:
jliddev
2021-04-19 08:57:08 -05:00
parent e99035a6ad
commit 338ca677e2

View File

@@ -617,9 +617,9 @@ export class AddonService {
});
const unzipPath = path.join(this._wowUpService.applicationDownloadsFolderPath, uuidv4());
unzippedDirectory = await this._fileService.unzipFile(downloadedFilePath, unzipPath);
try {
unzippedDirectory = await this._fileService.unzipFile(downloadedFilePath, unzipPath);
await this.installUnzippedDirectory(unzippedDirectory, installation);
} catch (err) {
console.error(err);