aboutsummaryrefslogtreecommitdiff
path: root/src/patcher.ts
diff options
context:
space:
mode:
authorVendicated <vendicated@riseup.net>2022-10-22 19:05:50 +0200
committerVendicated <vendicated@riseup.net>2022-10-22 19:05:50 +0200
commit35d2b8d1cfaad8ff92b6a812238d62b029a217a0 (patch)
treea7bbaf5f281cc906ae165391200ad88c3d08cbd7 /src/patcher.ts
parent0328966e0f7eca242afaf2a57f6dfadddd609d1f (diff)
downloadVencord-35d2b8d1cfaad8ff92b6a812238d62b029a217a0.tar.gz
Vencord-35d2b8d1cfaad8ff92b6a812238d62b029a217a0.tar.bz2
Vencord-35d2b8d1cfaad8ff92b6a812238d62b029a217a0.zip
patcher: Add back support for discord_arch_electron
Diffstat (limited to 'src/patcher.ts')
-rw-r--r--src/patcher.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/patcher.ts b/src/patcher.ts
index 16c4728..11a7031 100644
--- a/src/patcher.ts
+++ b/src/patcher.ts
@@ -28,8 +28,12 @@ console.log("[Vencord] Starting up...");
// Our injector file at app/index.js
const injectorPath = require.main!.filename;
+
+// special discord_arch_electron injection method
+const asarName = injectorPath.endsWith("app.asar/index.js") ? "_app.asar" : "app.asar";
+
// The original app.asar
-const asarPath = join(dirname(injectorPath), "..", "app.asar");
+const asarPath = join(dirname(injectorPath), "..", asarName);
const discordPkg = require(join(asarPath, "package.json"));
require.main!.filename = join(asarPath, discordPkg.main);