From 364b6c64f5fa1a575d21f632380d24477e435a1a Mon Sep 17 00:00:00 2001 From: SpikeHD Date: Sat, 30 Apr 2022 01:10:32 -0700 Subject: [PATCH] store game exe properly --- resources/js/helpers.js | 2 +- resources/js/index.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/resources/js/helpers.js b/resources/js/helpers.js index f88b65b..1beba4a 100644 --- a/resources/js/helpers.js +++ b/resources/js/helpers.js @@ -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) } diff --git a/resources/js/index.js b/resources/js/index.js index 95a7857..3070a54 100644 --- a/resources/js/index.js +++ b/resources/js/index.js @@ -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))