something (#570)

* something

* fix

Fix writeFileSync path to use __dirname directly.

* Update http.ts

---------

Co-authored-by: thororen <78185467+thororen1234@users.noreply.github.com>
This commit is contained in:
prism 2025-12-16 22:03:27 +01:00 • committed by GitHub
parent bdacf99d13
commit d403806154
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -20,7 +20,7 @@ import { fetchBuffer, fetchJson } from "@main/utils/http";
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 { writeFileSync } from "original-fs";
import gitHash from "~git-hash";
import gitRemote from "~git-remote";
@ -72,11 +72,7 @@ async function applyUpdates() {
if (!PendingUpdate) return true;
const data = await fetchBuffer(PendingUpdate);
originalWriteFileSync(__dirname, data);
const fd = openSync(__dirname, "r");
fsyncSync(fd);
closeSync(fd);
writeFileSync(__dirname, data, { flush: true });
PendingUpdate = null;