mirror of
https://github.com/Grasscutters/GrassClipper.git
synced 2024-11-16 04:45:34 +00:00
openInExplorer function
This commit is contained in:
parent
91669b8f26
commit
cac04193de
@ -61,14 +61,14 @@ async function openGameFolder() {
|
||||
const config = await getCfg()
|
||||
const folder = config.gameexe.match(/.*\\/g, '')[0]
|
||||
|
||||
createCmdWindow(`explorer.exe "${folder}"`)
|
||||
openInExplorer(folder)
|
||||
}
|
||||
|
||||
async function openGrasscutterFolder() {
|
||||
const config = await getCfg()
|
||||
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 })
|
||||
}
|
||||
|
||||
const openInExplorer = async (path) => {
|
||||
createCmdWindow(`explorer.exe "${path}"`)
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable play buttons
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user