diff options
-rw-r--r-- | src/utils.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/utils.js b/src/utils.js index 842ff99..5761558 100644 --- a/src/utils.js +++ b/src/utils.js @@ -212,14 +212,6 @@ function getTF2Version() { // <file>.excluded, then rename them back after the extraction. The // unzip module does not support excluding files directly. async function update() { - // Renames excluded files to <file>.excluded - for (let i = 0; i < settings.excludes.length; i++) { - let exclude = path.join(settings.gamepath + "/" + settings.excludes[i]); - if (fs.existsSync(exclude)) { - fs.renameSync(exclude, exclude + ".excluded") - } - } - ipcMain.emit("ns-update-event", "cli.update.checking"); console.log(lang("cli.update.checking")); var version = getNSVersion(); @@ -241,6 +233,14 @@ async function update() { ipcMain.emit("ns-update-event", "cli.update.downloading"); } + // Renames excluded files to <file>.excluded + for (let i = 0; i < settings.excludes.length; i++) { + let exclude = path.join(settings.gamepath + "/" + settings.excludes[i]); + if (fs.existsSync(exclude)) { + fs.renameSync(exclude, exclude + ".excluded") + } + } + // Start the download of the zip https.get(requests.getLatestNsVersionLink(), (res) => { let stream = fs.createWriteStream(settings.zip); |