From 223790b0bd765d71a01538c63195dc8b65960e69 Mon Sep 17 00:00:00 2001 From: SpikeHD Date: Tue, 3 May 2022 20:34:53 -0700 Subject: [PATCH] potentially fix opening game/gc folders --- resources/js/helpers.js | 12 +++++------- resources/js/index.js | 1 - 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/resources/js/helpers.js b/resources/js/helpers.js index 8fe28c2..6952906 100644 --- a/resources/js/helpers.js +++ b/resources/js/helpers.js @@ -91,23 +91,22 @@ async function openLatestDownload() { async function openGameFolder() { const config = await getCfg() - const folder = config.gameexe.match(/.*\\/g, '')[0] - - openInExplorer(folder) + const folder = config.gameexe.match(/.*\\|.*\//g, '') + + if (folder.length > 0) openInExplorer(folder[0]) } async function openGrasscutterFolder() { const config = await getCfg() - const folder = config.serverFolder.match(/.*\\|.*\//g, '')[0] + const folder = config.serverFolder.match(/.*\\|.*\//g, '') - openInExplorer(folder) + if (folder.length > 0) openInExplorer(folder[0]) } /** * Minimize the window */ function minimizeWin() { - console.log('min') Neutralino.window.minimize() } @@ -115,7 +114,6 @@ function minimizeWin() { * Close the window */ function closeWin() { - console.log('close') Neutralino.app.exit() window.close() diff --git a/resources/js/index.js b/resources/js/index.js index 15523cc..911cdcc 100644 --- a/resources/js/index.js +++ b/resources/js/index.js @@ -7,7 +7,6 @@ const createCmdWindow = async (command) => { } const openInExplorer = async (path) => { - console.log(`explorer.exe "${path}"`) createCmdWindow(`explorer.exe "${path}"`) }