openInExplorer function

This commit is contained in:
SpikeHD 2022-04-26 02:26:53 -07:00
parent 91669b8f26
commit cac04193de
2 changed files with 6 additions and 2 deletions

View File

@ -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)
} }
/** /**

View File

@ -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
*/ */