diff --git a/src/main/updater/http.ts b/src/main/updater/http.ts index 0985a8cf7..b5cb36cd4 100644 --- a/src/main/updater/http.ts +++ b/src/main/updater/http.ts @@ -21,6 +21,7 @@ import { IpcEvents } from "@shared/IpcEvents"; import { VENCORD_USER_AGENT } from "@shared/vencordUserAgent"; import { ipcMain } from "electron"; import { closeSync, fsyncSync, openSync, writeFileSync as originalWriteFileSync } from "original-fs"; +import { join } from "path"; import gitHash from "~git-hash"; import gitRemote from "~git-remote"; @@ -72,9 +73,10 @@ async function applyUpdates() { if (!PendingUpdate) return true; const data = await fetchBuffer(PendingUpdate); - originalWriteFileSync(__dirname, data); + const asarPath = join(__dirname, ASAR_FILE); + originalWriteFileSync(asarPath, data); - const fd = openSync(__dirname, "r"); + const fd = openSync(asarPath, "r"); fsyncSync(fd); closeSync(fd);