Skip to content

Commit a46e342

Browse files
committed
fix(linux): Fix linux game directory resolver ignoring Game.steamFolderName variable
1 parent 8cbcc1a commit a46e342

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
@@ -70,7 +70,12 @@ export default class GameDirectoryResolverImpl extends GameDirectoryResolverProv
7070
const folderName = parsedVdf.AppState.installdir;
7171
const gamePath = path.join(manifestLocation, 'common', folderName);
7272
if (await fs.exists(gamePath)) {
73-
return gamePath;
73+
if (gamePath.endsWith(path.dirname(GameManager.activeGame.steamFolderName))) {
74+
const dir = path.dirname(gamePath);
75+
return path.join(dir, GameManager.activeGame.steamFolderName);
76+
} else {
77+
return gamePath;
78+
}
7479
} else {
7580
return new FileNotFoundError(
7681
`${game.displayName} does not exist in Steam\'s specified location`,

0 commit comments

Comments
 (0)