mirror of
https://github.com/Grasscutters/GrassClipper.git
synced 2024-11-26 01:41:02 +00:00
automatically find game folder when launcher folder is selected
This commit is contained in:
parent
8e6d29df62
commit
2ff8c4ec38
@ -366,7 +366,17 @@ async function setGenshinImpactFolder() {
|
||||
// Set the folder in our configuration
|
||||
const config = await getCfg()
|
||||
|
||||
// See if the actual game folder is inside this one
|
||||
const folderList = await Neutralino.filesystem.readDirectory(folder)
|
||||
const gameFolder = folderList.filter(file => file.entry.includes('Genshin Impact Game'))
|
||||
|
||||
if (gameFolder.length > 0) {
|
||||
config.genshinImpactFolder = folder + '\\Genshin Impact Game'
|
||||
Neutralino.storage.setData('config', JSON.stringify(config))
|
||||
} else {
|
||||
config.genshinImpactFolder = folder
|
||||
}
|
||||
|
||||
Neutralino.storage.setData('config', JSON.stringify(config))
|
||||
|
||||
// Refresh background and path
|
||||
|
Loading…
Reference in New Issue
Block a user