feat: removing documents mapping

This commit is contained in:
Chubby Granny Chaser
2024-10-08 04:23:33 +01:00
parent 16cd5b43d8
commit 446b03eeff
3 changed files with 78 additions and 109 deletions

View File

@@ -7,7 +7,7 @@ import crypto from "node:crypto";
import { GameShop } from "@types";
import axios from "axios";
import os from "node:os";
import { artifactMetadataFileName, backupsPath } from "@main/constants";
import { backupsPath } from "@main/constants";
import { app } from "electron";
import { normalizePath } from "@main/helpers";
@@ -21,22 +21,7 @@ const bundleBackup = async (shop: GameShop, objectId: string) => {
await Ludusavi.backupGame(shop, objectId, backupPath);
const tarLocation = path.join(backupsPath, `${crypto.randomUUID()}.zip`);
fs.writeFileSync(
path.join(backupPath, artifactMetadataFileName),
JSON.stringify({
home: normalizePath(app.getPath("home")),
documents: normalizePath(app.getPath("documents")),
})
);
console.log(
JSON.stringify({
home: normalizePath(app.getPath("home")),
documents: normalizePath(app.getPath("documents")),
})
);
const tarLocation = path.join(backupsPath, `${crypto.randomUUID()}.tar`);
await tar.create(
{