From b53de48f27a07c1a898bec294ea1a01bc12edea1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1l=20P=C3=A9ter?= Date: Sun, 2 Jan 2022 18:25:16 +0100 Subject: [PATCH] fix: call chmod only when unpacked --- main/helpers/LegendaryInstaller.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/main/helpers/LegendaryInstaller.ts b/main/helpers/LegendaryInstaller.ts index eae36ae..3f996c3 100644 --- a/main/helpers/LegendaryInstaller.ts +++ b/main/helpers/LegendaryInstaller.ts @@ -86,7 +86,6 @@ export class LegendaryInstaller { // The destination stream is ended by the time it's called file.on('finish', () => { LegendaryInstaller.log(`Download finished! (path: ${path})`); - this.fixPermission(); resolve(null); }); @@ -132,7 +131,6 @@ export class LegendaryInstaller { })) .on("close", () => { LegendaryInstaller.log(`Unzipping finished!`); - this.fixPermission(); fs.unlinkSync(this.getDownloadPath()); resolve(null); }) @@ -151,6 +149,7 @@ export class LegendaryInstaller { private async install() { await this.download(); if (this.link.unzip) await this.unzip(); + this.fixPermission(); return; } }