mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-29 22:01:03 +00:00
fix: removing backup folder before uploading
This commit is contained in:
@@ -13,6 +13,11 @@ import { app } from "electron";
|
||||
const bundleBackup = async (shop: GameShop, objectId: string) => {
|
||||
const backupPath = path.join(backupsPath, `${shop}-${objectId}`);
|
||||
|
||||
// Remove existing backup
|
||||
if (fs.existsSync(backupPath)) {
|
||||
fs.rmSync(backupPath, { recursive: true });
|
||||
}
|
||||
|
||||
await Ludusavi.backupGame(shop, objectId, backupPath);
|
||||
|
||||
const tarLocation = path.join(backupsPath, `${crypto.randomUUID()}.zip`);
|
||||
|
||||
Reference in New Issue
Block a user