Skip to content

Make NodePathProvider::resolve variadic#1983

Merged
ebkr merged 1 commit intoebkr:developfrom
RossBrunton:pathfix
Nov 18, 2025
Merged

Make NodePathProvider::resolve variadic#1983
ebkr merged 1 commit intoebkr:developfrom
RossBrunton:pathfix

Conversation

@RossBrunton
Copy link
Copy Markdown
Contributor

The associated node function is variadic, and this is assumed by the linux path management.

I think this partially fixes #1963, although on my local system there's another issue preventing Linux from working.

The associated node function is variadic, and this is assumed by the
linux path management.

I think this partially fixes ebkr#1963, although on my local system there's
another issue preventing Linux from working.
@ebkr
Copy link
Copy Markdown
Owner

ebkr commented Nov 17, 2025

Could you elaborate on how exactly this would fix the linked issue?

I don't believe this is needed, as it works on an application restart as mentioned which suggests it's an odd runtime env bug, rather than a resolve bug.

@RossBrunton
Copy link
Copy Markdown
Contributor Author

src/r2mm/manager/linux/GameDirectoryResolver.ts contains this:

            const dirs = [
                path.resolve(os.homedir(), '.local', 'share', 'Steam'),
                path.resolve(os.homedir(), '.steam', 'steam'),
                path.resolve(os.homedir(), '.steam', 'root'),
                path.resolve(os.homedir(), '.steam'),
                path.resolve(os.homedir(), '.var', 'app', 'com.valvesoftware.Steam', '.local', 'share', 'Steam'),
                path.resolve(os.homedir(), '.var', 'app', 'com.valvesoftware.Steam', '.steam', 'steam'),
                path.resolve(os.homedir(), '.var', 'app', 'com.valvesoftware.Steam', '.steam', 'root'),
                path.resolve(os.homedir(), '.var', 'app', 'com.valvesoftware.Steam', '.steam')
            ];

As the resolve helper function is not variadic, only the first argument is used. This means it effectively checks /home/whatever eight times for the steam library, which fails.

Once it is set manually (and apparently after a restart?) this autodiscovery is skipped in favour of the value in the preferences.

Copy link
Copy Markdown
Owner

@ebkr ebkr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works perfectly, thanks 🔥

@ebkr ebkr merged commit 4e81892 into ebkr:develop Nov 18, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] - SteamOS autodetect

2 participants