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

+33 -11
View File
@@ -29,7 +29,8 @@ export default function Installs () {
downloadProgress,
linuxUseWine,
linuxWineCommand,
versions
versions,
customDataLocation
} = useGlobal()
const params = useSearchParams()
@@ -271,14 +272,28 @@ export default function Installs () {
)
if (
await exists('game/' + v, {
baseDir: BaseDirectory.AppLocalData
})
await exists(
customDataLocation
? customDataLocation + '/'
: null + 'game/' + v,
{
baseDir: customDataLocation
? undefined
: BaseDirectory.AppLocalData
}
)
)
await remove('game/' + v, {
baseDir: BaseDirectory.AppLocalData,
recursive: true
})
await remove(
customDataLocation
? customDataLocation + '/'
: null + 'game/' + v,
{
baseDir: customDataLocation
? undefined
: BaseDirectory.AppLocalData,
recursive: true
}
)
//reinstall
setSelectedVersionList([v])
@@ -356,9 +371,16 @@ export default function Installs () {
e.stopPropagation()
if (
!(await exists('game/' + v + '/BepInEx', {
baseDir: BaseDirectory.AppLocalData
}))
!(await exists(
customDataLocation
? customDataLocation + '/'
: null + 'game/' + v + '/BepInEx',
{
baseDir: customDataLocation
? undefined
: BaseDirectory.AppLocalData
}
))
) {
if (
(await ask(