Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed GameDir location issues. #152

Merged
merged 7 commits into from
Dec 23, 2024

Conversation

Johnny-Connor
Copy link
Contributor

I couldn't launch the game without this.


By creating this pull request, I understand that code that is AI generated or otherwise automatically generated may be rejected without further discussion.
I declare that I fully understand all code I pushed into this PR, and wrote all this code myself and own the rights to this code.

I couldn't launch the game without this.
Copy link
Collaborator

@WiserTixx WiserTixx left a comment

Choose a reason for hiding this comment

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

From my testing the snap install does have the libraryfolders file, which we do need incase the user changes the installation location.
My code suggestions include the change required and some small bits.

src/Security/BeamNG.cpp Outdated Show resolved Hide resolved
src/Security/BeamNG.cpp Outdated Show resolved Hide resolved
src/Security/BeamNG.cpp Outdated Show resolved Hide resolved
src/Security/BeamNG.cpp Outdated Show resolved Hide resolved
@Johnny-Connor
Copy link
Contributor Author

Johnny-Connor commented Dec 6, 2024

I know the snap version has its libraryFolders, but for me they didn't find the gameDir for some reason, so I omitted their address. But if they worked with you, maybe something is miss configured on my end.

Edit: miss configuration confirmed, debug(folderInfo.second->attribs["path"]); was printing me ~/.var/app/com.valvesoftware.Steam/.local/share/Steam (flatpak path) even though I'm not even using it anymore.

@WiserTixx WiserTixx requested a review from lionkor December 6, 2024 18:53
src/Security/BeamNG.cpp Outdated Show resolved Hide resolved
src/Security/BeamNG.cpp Outdated Show resolved Hide resolved
src/Security/BeamNG.cpp Show resolved Hide resolved
As requested:
- Changed 'string' variables that referred to paths to 'filesystem'.
- Added error log for when a valid 'GameDir' isn't found.

Also readded error log for when 'libraryfolders.vdf' is missing for better contextualization for the 'basic_string::_M_replace_aux' error (the code doesn't reach the GameDir segment when that file is not found).
src/Security/BeamNG.cpp Outdated Show resolved Hide resolved
@Johnny-Connor Johnny-Connor changed the title Fixed GameDir localization issues. Fixed GameDir location issues. Dec 16, 2024
@WiserTixx WiserTixx merged commit a8a4dfb into BeamMP:master Dec 23, 2024
2 checks 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.

3 participants