Skip to content

Commit

Permalink
fix: missing patched path discord
Browse files Browse the repository at this point in the history
  • Loading branch information
alvindimas05 committed Oct 14, 2024
1 parent 2679b4e commit 8549ba8
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/patches/discord.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,8 @@ export default class Discord extends AppPatch {
}
}
patched() {
try {
const fileExists = fs.existsSync(this.patchedPath);
return (fileExists ? PatchType.PATCHED : PatchType.UNPATCHED);
} catch {
return PatchType.UNPATCHED;
}
const fileExists = fs.existsSync(this.patchedPath);
return (fileExists ? PatchType.PATCHED : PatchType.UNPATCHED);
}
supported(): boolean {
return this.appName === this.originalAppName;
Expand All @@ -41,6 +37,7 @@ export default class Discord extends AppPatch {
if(!fs.existsSync(discordPath)) return this.missingData();
await patchFile(this.krispPath, patchOptions);

fs.mkdirSync(path.join(this.patchedPath, ".."), { recursive: true });
fs.writeFileSync(this.patchedPath, "");
}
}

0 comments on commit 8549ba8

Please sign in to comment.