From c72e1294c6da596333c90cdb9814df684230bc3f Mon Sep 17 00:00:00 2001 From: Felix Rieseberg Date: Wed, 29 Jul 2020 11:43:12 -0700 Subject: [PATCH] fix: Don't delete original disk --- src/basilisk/BasiliskII-worker-boot.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/basilisk/BasiliskII-worker-boot.js b/src/basilisk/BasiliskII-worker-boot.js index 70f68e6..63d0e4e 100644 --- a/src/basilisk/BasiliskII-worker-boot.js +++ b/src/basilisk/BasiliskII-worker-boot.js @@ -342,7 +342,6 @@ self.onmessage = async function (msg) { if (msg && msg.data === "disk_save") { const diskData = Module.FS.readFile("/disk"); const diskPath = getUserDataDiskPath(); - const basiliskDiskPath = path.join(__dirname, "disk"); // I wish we could do this with promises, but OOM crashes kill that idea try { @@ -353,14 +352,6 @@ self.onmessage = async function (msg) { console.error(`Failed to write disk`, error); } - try { - if (fs.existsSync(basiliskDiskPath) && !(Module && Module.isDevMode)) { - fs.unlinkSync(basiliskDiskPath); - } - } catch (error) { - console.error(`Failed to delete ${basiliskDiskPath}`); - } - // Now, user files console.log(`Saving user files`); await saveFilesInPath("/macintosh.js");