feat: removing directory sync

This commit is contained in:
Chubby Granny Chaser 2024-10-05 04:29:29 +01:00
parent b99dbe83e2
commit 9391b7e6c9
No known key found for this signature in database

View file

@ -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 }));
};