Fix issues with non custom data location installs

This commit is contained in:
Lncvrt committed 2026-07-29 06:38:23 -07:00
1 parent 5ce8aa76ab
commit affc6c19cb
5 files changed
+15 -17

No files matched your search

+1 -1
View File
@@ -344,7 +344,7 @@ export default function GamePage () {
!(await exists( !(await exists(
customDataLocation customDataLocation
? customDataLocation + '/' ? customDataLocation + '/'
: null + 'game/' + v + '/BepInEx', : '' + 'game/' + v + '/BepInEx',
{ {
baseDir: customDataLocation baseDir: customDataLocation
? undefined ? undefined
+2 -2
View File
@@ -398,7 +398,7 @@ export default function RootLayout ({
if ( if (
await exists( await exists(
(customDataLocation ? customDataLocation + '/' : null) + (customDataLocation ? customDataLocation + '/' : '') +
'game/' + 'game/' +
version, version,
{ {
@@ -407,7 +407,7 @@ export default function RootLayout ({
) )
) )
await remove( await remove(
(customDataLocation ? customDataLocation + '/' : null) + (customDataLocation ? customDataLocation + '/' : '') +
'game/' + 'game/' +
version, version,
{ {
+8 -10
View File
@@ -159,8 +159,7 @@ export default function SettingsPage () {
onClick={async () => { onClick={async () => {
if ( if (
await exists( await exists(
(customDataLocation ? customDataLocation + '/' : null) + (customDataLocation ? customDataLocation + '/' : '') + 'game',
'game',
{ {
baseDir: customDataLocation baseDir: customDataLocation
? undefined ? undefined
@@ -169,8 +168,7 @@ export default function SettingsPage () {
) )
) )
await remove( await remove(
(customDataLocation ? customDataLocation + '/' : null) + (customDataLocation ? customDataLocation + '/' : '') + 'game',
'game',
{ {
baseDir: customDataLocation baseDir: customDataLocation
? undefined ? undefined
@@ -181,7 +179,7 @@ export default function SettingsPage () {
if ( if (
await exists( await exists(
(customDataLocation ? customDataLocation + '/' : null) + (customDataLocation ? customDataLocation + '/' : '') +
'downloads', 'downloads',
{ {
baseDir: customDataLocation baseDir: customDataLocation
@@ -191,7 +189,7 @@ export default function SettingsPage () {
) )
) )
await remove( await remove(
(customDataLocation ? customDataLocation + '/' : null) + (customDataLocation ? customDataLocation + '/' : '') +
'downloads', 'downloads',
{ {
baseDir: customDataLocation baseDir: customDataLocation
@@ -215,7 +213,7 @@ export default function SettingsPage () {
onClick={async () => { onClick={async () => {
if ( if (
await exists( await exists(
(customDataLocation ? customDataLocation + '/' : null) + (customDataLocation ? customDataLocation + '/' : '') +
'downloads', 'downloads',
{ {
baseDir: customDataLocation baseDir: customDataLocation
@@ -225,7 +223,7 @@ export default function SettingsPage () {
) )
) )
await remove( await remove(
(customDataLocation ? customDataLocation + '/' : null) + (customDataLocation ? customDataLocation + '/' : '') +
'downloads', 'downloads',
{ {
baseDir: customDataLocation baseDir: customDataLocation
@@ -243,7 +241,7 @@ export default function SettingsPage () {
title='If you had a game that was downloaded before it was taken down after you downloaded it, it will get removed here.' title='If you had a game that was downloaded before it was taken down after you downloaded it, it will get removed here.'
onClick={async () => { onClick={async () => {
const items = await readDir( const items = await readDir(
(customDataLocation ? customDataLocation + '/' : null) + 'game', (customDataLocation ? customDataLocation + '/' : '') + 'game',
{ {
baseDir: customDataLocation baseDir: customDataLocation
? undefined ? undefined
@@ -259,7 +257,7 @@ export default function SettingsPage () {
) { ) {
removed.push(item.name) removed.push(item.name)
await remove( await remove(
(customDataLocation ? customDataLocation + '/' : null) + (customDataLocation ? customDataLocation + '/' : '') +
'game/' + 'game/' +
item.name, item.name,
{ {
+2 -2
View File
@@ -137,7 +137,7 @@ export default function ManageGamePopup () {
if ( if (
await exists( await exists(
(customDataLocation ? customDataLocation + '/' : null) + (customDataLocation ? customDataLocation + '/' : '') +
'game/' + 'game/' +
managingVersion, managingVersion,
{ {
@@ -148,7 +148,7 @@ export default function ManageGamePopup () {
) )
) )
await remove( await remove(
(customDataLocation ? customDataLocation + '/' : null) + (customDataLocation ? customDataLocation + '/' : '') +
'game/' + 'game/' +
managingVersion, managingVersion,
{ {
+2 -2
View File
@@ -320,7 +320,7 @@ export default function ModDownloadsPopup () {
showModInfo.id showModInfo.id
if ( if (
await exists( await exists(
(customDataLocation ? customDataLocation + '/' : null) + (customDataLocation ? customDataLocation + '/' : '') +
path, path,
{ {
baseDir: customDataLocation baseDir: customDataLocation
@@ -330,7 +330,7 @@ export default function ModDownloadsPopup () {
) )
) )
await remove( await remove(
(customDataLocation ? customDataLocation + '/' : null) + (customDataLocation ? customDataLocation + '/' : '') +
path, path,
{ {
baseDir: customDataLocation baseDir: customDataLocation