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(
|
!(await exists(
|
||||||
customDataLocation
|
customDataLocation
|
||||||
? customDataLocation + '/'
|
? customDataLocation + '/'
|
||||||
: null + 'game/' + v + '/BepInEx',
|
: '' + 'game/' + v + '/BepInEx',
|
||||||
{
|
{
|
||||||
baseDir: customDataLocation
|
baseDir: customDataLocation
|
||||||
? undefined
|
? undefined
|
||||||
|
|||||||
@@ -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,
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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,
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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,
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in new issue
Block a user