fix opening folders again

This commit is contained in:
SpikeHD 2022-05-05 17:29:23 -07:00
parent e8fe7e316f
commit 351d6daa34
2 changed files with 3 additions and 3 deletions

View File

@ -10,7 +10,7 @@
"grasscutterFileSet": "Set \"Grasscutter\" .jar file",
"folderNotSet": "Not set",
"ipPlaceholder": "IP Address",
"ipPlaceholder": "Server Address...",
"portPlaceholder": "Port",
"noFavorites": "No favorites set",

View File

@ -93,14 +93,14 @@ async function openGameFolder() {
const config = await getCfg()
const folder = config.gameexe.match(/.*\\|.*\//g, '')
if (folder.length > 0) openInExplorer(folder[0])
if (folder.length > 0) openInExplorer(folder[0].replace(/\//g, '\\'))
}
async function openGrasscutterFolder() {
const config = await getCfg()
const folder = config.serverFolder.match(/.*\\|.*\//g, '')
if (folder.length > 0) openInExplorer(folder[0])
if (folder.length > 0) openInExplorer(folder[0].replace(/\//g, '\\'))
}
// https://www.jimzhao.us/2015/09/javascript-detect-chinese-character.html