mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-16 09:04:45 +01:00
fix opening and some other stuff
This commit is contained in:
@@ -169,8 +169,13 @@ export async function getInstalledMods() {
|
||||
return Object.keys(mods).map((path) => {
|
||||
const info = JSON.parse(mods[path]) as ModData | PartialModData
|
||||
|
||||
const modPathArr = path.replace(/\\/g, '/').split('/')
|
||||
|
||||
// If there is a file in this path, remove it from the path
|
||||
if (modPathArr[modPathArr.length - 1].includes('.')) modPathArr.pop()
|
||||
|
||||
return {
|
||||
path,
|
||||
path: modPathArr.join('/'),
|
||||
info,
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user