potentially fix opening game/gc folders

This commit is contained in:
SpikeHD 2022-05-03 20:34:53 -07:00
parent c5af2666ae
commit 223790b0bd
2 changed files with 5 additions and 8 deletions

View File

@ -91,23 +91,22 @@ async function openLatestDownload() {
async function openGameFolder() { async function openGameFolder() {
const config = await getCfg() const config = await getCfg()
const folder = config.gameexe.match(/.*\\/g, '')[0] const folder = config.gameexe.match(/.*\\|.*\//g, '')
openInExplorer(folder) if (folder.length > 0) openInExplorer(folder[0])
} }
async function openGrasscutterFolder() { async function openGrasscutterFolder() {
const config = await getCfg() 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 * Minimize the window
*/ */
function minimizeWin() { function minimizeWin() {
console.log('min')
Neutralino.window.minimize() Neutralino.window.minimize()
} }
@ -115,7 +114,6 @@ function minimizeWin() {
* Close the window * Close the window
*/ */
function closeWin() { function closeWin() {
console.log('close')
Neutralino.app.exit() Neutralino.app.exit()
window.close() window.close()

View File

@ -7,7 +7,6 @@ const createCmdWindow = async (command) => {
} }
const openInExplorer = async (path) => { const openInExplorer = async (path) => {
console.log(`explorer.exe "${path}"`)
createCmdWindow(`explorer.exe "${path}"`) createCmdWindow(`explorer.exe "${path}"`)
} }