Fix issues with non custom data location installs
This commit is contained in:
5 files changed
+15
-17
No files matched your search
@@ -344,7 +344,7 @@ export default function GamePage () {
|
||||
!(await exists(
|
||||
customDataLocation
|
||||
? customDataLocation + '/'
|
||||
: null + 'game/' + v + '/BepInEx',
|
||||
: '' + 'game/' + v + '/BepInEx',
|
||||
{
|
||||
baseDir: customDataLocation
|
||||
? undefined
|
||||
|
||||
@@ -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,
|
||||
{
|
||||
|
||||
@@ -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,
|
||||
{
|
||||
|
||||
@@ -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,
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user