Sync launcher 1.2.2: monitor-aware resolution ownership, SuperWoW mod and mods-on-by-default, Patch-O raid visuals toggle, background-sound CVar, launch/quit stability fixes
Build check / build (push) Has been cancelled

This commit is contained in:
OctoWoW
2026-08-05 17:20:48 -07:00
parent 5812065b56
commit 1255e40d01
19 changed files with 767 additions and 131 deletions
+13 -2
View File
@@ -10,6 +10,7 @@ if (!port) throw new Error('IllegalState');
const { dir, url, ref } = workerData;
const tmpDir = `${dir}.tmp`;
const bakDir = `${dir}.bak`;
const run = async () => {
await fs.remove(tmpDir);
@@ -23,8 +24,18 @@ const run = async () => {
onProgress: (...args) => port.postMessage({ cb: 'onProgress', args })
});
await fs.remove(dir);
await fs.move(tmpDir, dir);
await fs.remove(bakDir);
const hadExisting = await fs.pathExists(dir);
if (hadExisting) await fs.move(dir, bakDir);
try {
await fs.move(tmpDir, dir);
} catch (e) {
if (hadExisting) await fs.move(bakDir, dir).catch(() => undefined);
throw e;
}
await fs.remove(bakDir).catch(() => undefined);
};
run()