Skip to content

Commit

Permalink
fix: Don't delete original disk
Browse files Browse the repository at this point in the history
  • Loading branch information
felixrieseberg committed Jul 29, 2020
1 parent f4c1e4d commit c72e129
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/basilisk/BasiliskII-worker-boot.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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");
Expand Down

0 comments on commit c72e129

Please sign in to comment.