Fix resource getting

This commit is contained in:
SpikeHD 2022-05-07 22:51:17 -07:00
parent 60569bf0b1
commit f2cdab068a

View File

@ -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)