Skip to content

Commit 6d7a8c1

Browse files
committed
fix(linux): Fix linux game directory resolver ignoring Game.steamFolderName variable
1 parent 59ee266 commit 6d7a8c1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/r2mm/manager/linux/GameDirectoryResolver.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,12 @@ export default class GameDirectoryResolverImpl extends GameDirectoryResolverProv
6969
const folderName = parsedVdf.AppState.installdir;
7070
const gamePath = path.join(manifestLocation, 'common', folderName);
7171
if (await fs.exists(gamePath)) {
72-
return gamePath;
72+
if (gamePath.endsWith(path.dirname(GameManager.activeGame.steamFolderName))) {
73+
const dir = path.dirname(gamePath);
74+
return path.join(dir, GameManager.activeGame.steamFolderName);
75+
} else {
76+
return gamePath;
77+
}
7378
} else {
7479
return new FileNotFoundError(
7580
`${game.displayName} does not exist in Steam\'s specified location`,

0 commit comments

Comments
 (0)