Fix custom data location problems

This commit is contained in:
Lncvrt committed 2026-04-29 15:50:56 -07:00
1 parent 998fb6d309
commit 254a1d5b5c
4 files changed
+121 -46

No files matched your search

+44 -15
View File
@@ -27,7 +27,8 @@ export default function ManageVersionPopup () {
setPopupMode,
setSelectedVersionList,
downloadVersions,
versions
versions,
customDataLocation
} = useGlobal()
const [versionSize, setVersionSize] = useState<number>(0)
@@ -140,14 +141,28 @@ export default function ManageVersionPopup () {
)
if (
await exists('game/' + managingVersion, {
baseDir: BaseDirectory.AppLocalData
})
await exists(
(customDataLocation ? customDataLocation + '/' : null) +
'game/' +
managingVersion,
{
baseDir: customDataLocation
? undefined
: BaseDirectory.AppLocalData
}
)
)
await remove('game/' + managingVersion, {
baseDir: BaseDirectory.AppLocalData,
recursive: true
})
await remove(
(customDataLocation ? customDataLocation + '/' : null) +
'game/' +
managingVersion,
{
baseDir: customDataLocation
? undefined
: BaseDirectory.AppLocalData,
recursive: true
}
)
}}
title='Click to uninstall this game. This will NOT remove any progress or any save files.'
hidden={viewingInfoFromDownloads}
@@ -172,14 +187,28 @@ export default function ManageVersionPopup () {
)
if (
await exists('game/' + managingVersion, {
baseDir: BaseDirectory.AppLocalData
})
await exists(
(customDataLocation ? customDataLocation + '/' : null) +
'game/' +
managingVersion,
{
baseDir: customDataLocation
? undefined
: BaseDirectory.AppLocalData
}
)
)
await remove('game/' + managingVersion, {
baseDir: BaseDirectory.AppLocalData,
recursive: true
})
await remove(
(customDataLocation ? customDataLocation + '/' : null) +
'game/' +
managingVersion,
{
baseDir: customDataLocation
? undefined
: BaseDirectory.AppLocalData,
recursive: true
}
)
//reinstall
setSelectedVersionList([managingVersion])