diff --git a/src/app/main/game/page.tsx b/src/app/main/game/page.tsx index b9b2124..fec8d7c 100644 --- a/src/app/main/game/page.tsx +++ b/src/app/main/game/page.tsx @@ -344,7 +344,7 @@ export default function GamePage () { !(await exists( customDataLocation ? customDataLocation + '/' - : null + 'game/' + v + '/BepInEx', + : '' + 'game/' + v + '/BepInEx', { baseDir: customDataLocation ? undefined diff --git a/src/app/main/layout.tsx b/src/app/main/layout.tsx index 80273d7..16741ee 100644 --- a/src/app/main/layout.tsx +++ b/src/app/main/layout.tsx @@ -398,7 +398,7 @@ export default function RootLayout ({ if ( await exists( - (customDataLocation ? customDataLocation + '/' : null) + + (customDataLocation ? customDataLocation + '/' : '') + 'game/' + version, { @@ -407,7 +407,7 @@ export default function RootLayout ({ ) ) await remove( - (customDataLocation ? customDataLocation + '/' : null) + + (customDataLocation ? customDataLocation + '/' : '') + 'game/' + version, { diff --git a/src/app/main/settings/page.tsx b/src/app/main/settings/page.tsx index 15f848e..5d45a10 100644 --- a/src/app/main/settings/page.tsx +++ b/src/app/main/settings/page.tsx @@ -159,8 +159,7 @@ export default function SettingsPage () { onClick={async () => { if ( await exists( - (customDataLocation ? customDataLocation + '/' : null) + - 'game', + (customDataLocation ? customDataLocation + '/' : '') + 'game', { baseDir: customDataLocation ? undefined @@ -169,8 +168,7 @@ export default function SettingsPage () { ) ) await remove( - (customDataLocation ? customDataLocation + '/' : null) + - 'game', + (customDataLocation ? customDataLocation + '/' : '') + 'game', { baseDir: customDataLocation ? undefined @@ -181,7 +179,7 @@ export default function SettingsPage () { if ( await exists( - (customDataLocation ? customDataLocation + '/' : null) + + (customDataLocation ? customDataLocation + '/' : '') + 'downloads', { baseDir: customDataLocation @@ -191,7 +189,7 @@ export default function SettingsPage () { ) ) await remove( - (customDataLocation ? customDataLocation + '/' : null) + + (customDataLocation ? customDataLocation + '/' : '') + 'downloads', { baseDir: customDataLocation @@ -215,7 +213,7 @@ export default function SettingsPage () { onClick={async () => { if ( await exists( - (customDataLocation ? customDataLocation + '/' : null) + + (customDataLocation ? customDataLocation + '/' : '') + 'downloads', { baseDir: customDataLocation @@ -225,7 +223,7 @@ export default function SettingsPage () { ) ) await remove( - (customDataLocation ? customDataLocation + '/' : null) + + (customDataLocation ? customDataLocation + '/' : '') + 'downloads', { 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.' onClick={async () => { const items = await readDir( - (customDataLocation ? customDataLocation + '/' : null) + 'game', + (customDataLocation ? customDataLocation + '/' : '') + 'game', { baseDir: customDataLocation ? undefined @@ -259,7 +257,7 @@ export default function SettingsPage () { ) { removed.push(item.name) await remove( - (customDataLocation ? customDataLocation + '/' : null) + + (customDataLocation ? customDataLocation + '/' : '') + 'game/' + item.name, { diff --git a/src/popups/ManageGame.tsx b/src/popups/ManageGame.tsx index 9be457c..d17cc75 100644 --- a/src/popups/ManageGame.tsx +++ b/src/popups/ManageGame.tsx @@ -137,7 +137,7 @@ export default function ManageGamePopup () { if ( await exists( - (customDataLocation ? customDataLocation + '/' : null) + + (customDataLocation ? customDataLocation + '/' : '') + 'game/' + managingVersion, { @@ -148,7 +148,7 @@ export default function ManageGamePopup () { ) ) await remove( - (customDataLocation ? customDataLocation + '/' : null) + + (customDataLocation ? customDataLocation + '/' : '') + 'game/' + managingVersion, { diff --git a/src/popups/ModDownloads.tsx b/src/popups/ModDownloads.tsx index 6f2c032..7049079 100644 --- a/src/popups/ModDownloads.tsx +++ b/src/popups/ModDownloads.tsx @@ -320,7 +320,7 @@ export default function ModDownloadsPopup () { showModInfo.id if ( await exists( - (customDataLocation ? customDataLocation + '/' : null) + + (customDataLocation ? customDataLocation + '/' : '') + path, { baseDir: customDataLocation @@ -330,7 +330,7 @@ export default function ModDownloadsPopup () { ) ) await remove( - (customDataLocation ? customDataLocation + '/' : null) + + (customDataLocation ? customDataLocation + '/' : '') + path, { baseDir: customDataLocation