this probably works

This commit is contained in:
thororen1234 2025-12-16 15:43:22 -05:00
parent 52484e5d72
commit 6408ba33bd
No known key found for this signature in database

View file

@ -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);