Skip to content

Commit

Permalink
support dataPathOverrides to fix osx path bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mrosack committed Dec 13, 2023
1 parent 0e15b5c commit 42708c0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
18 changes: 13 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
"pako": "^2.1.0",
"prettier": "^3.1.1",
"prettier-eslint": "^16.1.2",
"pydt-shared": "file:../shared/dist/pydt-shared-lib",
"pydt-shared": "^1.8.12",
"rimraf": "^5.0.5",
"rollbar": "^2.26.2",
"rxjs": "^7.8.1",
Expand Down
5 changes: 3 additions & 2 deletions ui/shared/pydtSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,13 @@ export class PydtSettingsData {

getDefaultDataPath(civGame: CivGame, gameStore?: GameStore): string {
const location: PlatformSaveLocation = civGame.saveLocations[window.pydtApi.platform];
const finalStore = gameStore || this.getGameStore(civGame);

let result = window.pydtApi.path.normalize(
window.pydtApi.path.join(
this.basePaths[location.basePath],
location.prefix,
civGame.dataPaths[gameStore || this.getGameStore(civGame)],
location.dataPathOverrides?.[finalStore] || civGame.dataPaths[finalStore],
),
);

Expand All @@ -79,7 +80,7 @@ export class PydtSettingsData {
window.pydtApi.path.join(
this.basePaths[protonLocation.basePath],
protonLocation.prefix,
civGame.dataPaths[gameStore || this.getGameStore(civGame)],
protonLocation.dataPathOverrides?.[finalStore] || civGame.dataPaths[finalStore],
),
);

Expand Down

0 comments on commit 42708c0

Please sign in to comment.