From f2cdab068ac0608b17fde9542dbe37b7104f58ec Mon Sep 17 00:00:00 2001 From: SpikeHD Date: Sat, 7 May 2022 22:51:17 -0700 Subject: [PATCH] Fix resource getting --- resources/js/gcdownloader.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/resources/js/gcdownloader.js b/resources/js/gcdownloader.js index 1320084..9ccd01c 100644 --- a/resources/js/gcdownloader.js +++ b/resources/js/gcdownloader.js @@ -135,7 +135,10 @@ async function downloadGC(branch) { async function downloadResources() { const config = await getCfg() - const serverFolderFixed = config.serverFolder.match(/.*\\|.*\//g, '')[0].replace(/\//g, '\\') + let serverFolderFixed = config.serverFolder.match(/.*\\|.*\//g, '')[0].replace(/\//g, '\\') + + // Remove trailing slash, it's important here + serverFolderFixed = serverFolderFixed.endsWith('\\') ? serverFolderFixed.slice(0, -1) : serverFolderFixed debug.log('Server folder fixed: ' + serverFolderFixed)