From 351d6daa345f2d0954d191f226049d71c5e7d68a Mon Sep 17 00:00:00 2001 From: SpikeHD Date: Thu, 5 May 2022 17:29:23 -0700 Subject: [PATCH] fix opening folders again --- languages/en.json | 2 +- resources/js/helpers.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/languages/en.json b/languages/en.json index 95b9965..82fe291 100644 --- a/languages/en.json +++ b/languages/en.json @@ -10,7 +10,7 @@ "grasscutterFileSet": "Set \"Grasscutter\" .jar file", "folderNotSet": "Not set", - "ipPlaceholder": "IP Address", + "ipPlaceholder": "Server Address...", "portPlaceholder": "Port", "noFavorites": "No favorites set", diff --git a/resources/js/helpers.js b/resources/js/helpers.js index 21c9a13..6e50018 100644 --- a/resources/js/helpers.js +++ b/resources/js/helpers.js @@ -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