From 9391b7e6c93a9ba84e8ecba6f7f8cc5fbfae0c37 Mon Sep 17 00:00:00 2001 From: Chubby Granny Chaser Date: Sat, 5 Oct 2024 04:29:29 +0100 Subject: [PATCH] feat: removing directory sync --- src/main/events/cloud-save/download-game-artifact.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/events/cloud-save/download-game-artifact.ts b/src/main/events/cloud-save/download-game-artifact.ts index f6899e6f..5c0b2c32 100644 --- a/src/main/events/cloud-save/download-game-artifact.ts +++ b/src/main/events/cloud-save/download-game-artifact.ts @@ -36,6 +36,11 @@ const replaceLudusaviBackupWithCurrentUser = ( // TODO: Only works on Windows const usersDirPath = path.join(gameBackupPath, "drive-C", "Users"); + fs.rmSync(gameBackupPath, { + recursive: true, + force: true, + }); + fs.renameSync( path.join(usersDirPath, path.basename(backupHomeDir)), path.join(usersDirPath, path.basename(currentHomeDir)) @@ -55,8 +60,6 @@ const replaceLudusaviBackupWithCurrentUser = ( }; }); - console.log(backups); - fs.writeFileSync(mappingYamlPath, YAML.stringify({ ...manifest, backups })); };