Skip to content

Commit

Permalink
fix: call chmod only when unpacked
Browse files Browse the repository at this point in the history
  • Loading branch information
pepyta committed Jan 2, 2022
1 parent 6eac70f commit b53de48
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions main/helpers/LegendaryInstaller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});

Expand Down Expand Up @@ -132,7 +131,6 @@ export class LegendaryInstaller {
}))
.on("close", () => {
LegendaryInstaller.log(`Unzipping finished!`);
this.fixPermission();
fs.unlinkSync(this.getDownloadPath());
resolve(null);
})
Expand All @@ -151,6 +149,7 @@ export class LegendaryInstaller {
private async install() {
await this.download();
if (this.link.unzip) await this.unzip();
this.fixPermission();
return;
}
}
Expand Down

0 comments on commit b53de48

Please sign in to comment.