mirror of
https://github.com/Grasscutters/GrassClipper.git
synced 2024-11-21 22:58:24 +00:00
potentially fix opening game/gc folders
This commit is contained in:
parent
c5af2666ae
commit
223790b0bd
@ -91,23 +91,22 @@ async function openLatestDownload() {
|
||||
|
||||
async function openGameFolder() {
|
||||
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() {
|
||||
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()
|
||||
|
@ -7,7 +7,6 @@ const createCmdWindow = async (command) => {
|
||||
}
|
||||
|
||||
const openInExplorer = async (path) => {
|
||||
console.log(`explorer.exe "${path}"`)
|
||||
createCmdWindow(`explorer.exe "${path}"`)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user