mirror of
https://github.com/Grasscutters/GrassClipper.git
synced 2024-08-14 13:11:48 +08:00
openInExplorer function
This commit is contained in:
parent
91669b8f26
commit
cac04193de
@ -61,14 +61,14 @@ async function openGameFolder() {
|
|||||||
const config = await getCfg()
|
const config = await getCfg()
|
||||||
const folder = config.gameexe.match(/.*\\/g, '')[0]
|
const folder = config.gameexe.match(/.*\\/g, '')[0]
|
||||||
|
|
||||||
createCmdWindow(`explorer.exe "${folder}"`)
|
openInExplorer(folder)
|
||||||
}
|
}
|
||||||
|
|
||||||
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, '')[0]
|
||||||
|
|
||||||
createCmdWindow(`explorer.exe "${folder}"`)
|
openInExplorer(folder)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -6,6 +6,10 @@ const createCmdWindow = async (command) => {
|
|||||||
Neutralino.os.execCommand(`cmd.exe /c start "" ${command}`, { background: true })
|
Neutralino.os.execCommand(`cmd.exe /c start "" ${command}`, { background: true })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const openInExplorer = async (path) => {
|
||||||
|
createCmdWindow(`explorer.exe "${path}"`)
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable play buttons
|
* Enable play buttons
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user