store game exe properly

This commit is contained in:
SpikeHD 2022-04-30 01:10:32 -07:00
parent dbfc52a270
commit 364b6c64f5
2 changed files with 3 additions and 2 deletions

View File

@ -59,7 +59,7 @@ async function proxyIsInstalled() {
async function openGameFolder() {
const config = await getCfg()
const folder = config.gameexe.match(/.*\//g, '')[0]
const folder = config.gameexe.match(/.*\\/g, '')[0]
openInExplorer(folder)
}

View File

@ -7,6 +7,7 @@ const createCmdWindow = async (command) => {
}
const openInExplorer = async (path) => {
console.log(`explorer.exe "${path}"`)
createCmdWindow(`explorer.exe "${path}"`)
}
@ -391,7 +392,7 @@ async function setGameExe() {
const config = await getCfg()
// It's an array of selections, so only get the first one
config.gameexe = gameExe[0]
config.gameexe = gameExe[0].replace(/\//g, '\\')
Neutralino.storage.setData('config', JSON.stringify(config))