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:
parent
bdacf99d13
commit
d403806154
1 changed files with 2 additions and 6 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue