diff options
author | 0neGal <mail@0negal.com> | 2024-02-04 23:28:36 +0100 |
---|---|---|
committer | 0neGal <mail@0negal.com> | 2024-02-04 23:28:36 +0100 |
commit | 0b3cdfb3d31c18d94bd54634239deabc28e0597e (patch) | |
tree | 1c71d8b2c585735021447e40034573f0535342c7 | |
parent | 18d8dce5388cd48a34b52f2cb5e7accde3a42b15 (diff) | |
download | Viper-0b3cdfb3d31c18d94bd54634239deabc28e0597e.tar.gz Viper-0b3cdfb3d31c18d94bd54634239deabc28e0597e.zip |
removed use of "vipertmp" folder
Previously we downloaded the Northstar archive and packages to a folder
named "vipertmp" in the system's cache folder, now that's just moved
into "Viper/Temp" (still inside the system's cache folder)
With this, all Viper cache is stored in the same folder in the system's
cache folder... Wait... Why wasn't it always like this? Oh right, my
past stupidity and lack of foresight. Oh well.
"vipertmp" still gets deleted when clearing install cache, along with
the new folder, so doing so will by itself clean up the old folder.
-rw-r--r-- | src/modules/mods.js | 2 | ||||
-rw-r--r-- | src/modules/packages.js | 2 | ||||
-rw-r--r-- | src/modules/settings.js | 2 | ||||
-rw-r--r-- | src/modules/update.js | 1 |
4 files changed, 4 insertions, 3 deletions
diff --git a/src/modules/mods.js b/src/modules/mods.js index 97d4e16..9e3e81e 100644 --- a/src/modules/mods.js +++ b/src/modules/mods.js @@ -597,7 +597,7 @@ mods.installFromURL = (url, author) => { // download mod to a temporary location https.get(url, (res) => { - let tmp = path.join(app.getPath("cache"), "vipertmp"); + let tmp = path.join(app.getPath("userData"), "Temp"); let modlocation = path.join(tmp, "/mod.zip"); // make sure the temporary folder exists diff --git a/src/modules/packages.js b/src/modules/packages.js index fca0a44..d690824 100644 --- a/src/modules/packages.js +++ b/src/modules/packages.js @@ -333,7 +333,7 @@ packages.download = async (url, name) => { return new Promise((resolve) => { // download mod to a temporary location https.get(url, (res) => { - let tmp = path.join(app.getPath("cache"), "vipertmp"); + let tmp = path.join(app.getPath("userData"), "Temp"); let zip_name = name || "package"; let zip_path = path.join(tmp, `${zip_name}.zip`); diff --git a/src/modules/settings.js b/src/modules/settings.js index 5449570..d513ec9 100644 --- a/src/modules/settings.js +++ b/src/modules/settings.js @@ -68,7 +68,7 @@ if (fs.existsSync("viper.json")) { ...settings, ...conf } - settings.zip = path.join(app.getPath("cache"), "vipertmp/northstar.zip"); + settings.zip = path.join(app.getPath("userData"), "Temp/northstar.zip"); let args = path.join(settings.gamepath, "ns_startup_args.txt"); if (! settings.nsargs && fs.existsSync(args)) { diff --git a/src/modules/update.js b/src/modules/update.js index 3def83b..7140fcd 100644 --- a/src/modules/update.js +++ b/src/modules/update.js @@ -22,6 +22,7 @@ let update = {}; ipcMain.on("delete-install-cache", () => { let delete_dirs = [ + path.join(app.getPath("userData"), "Temp"), path.join(app.getPath("cache"), "vipertmp"), path.join(settings().gamepath, "northstar.zip") ] |