Fix: BeamNG.drive not detected due to case-sensitive path mismatch in libraryfolders.vdf - #259
Open
SCPLEGION wants to merge 4 commits into
Open
Fix: BeamNG.drive not detected due to case-sensitive path mismatch in libraryfolders.vdf#259SCPLEGION wants to merge 4 commits into
SCPLEGION wants to merge 4 commits into
Conversation
Steam's libraryfolders.vdf can store a library path with different casing than the actual filesystem path (e.g. /mnt/hdd vs /mnt/HDD), which caused std::filesystem::exists() to fail and BeamNG.drive to go undetected. Add TryResolveGameDir(), which retries each path segment in upper/lower case until integrity.json is found. Also add ~/.local/share/Steam/steamapps as a known Steam location (Arch/Fedora and other distros without the .steam symlink), and log which Steam install/library folder is being checked to aid debugging.
There was a problem hiding this comment.
Pull request overview
This PR aims to improve BeamNG.drive detection on Linux when Steam’s libraryfolders.vdf records a library path whose casing doesn’t match the actual on-disk path on case-sensitive filesystems.
Changes:
- Added
TryResolveGameDir()to attempt resolving the BeamNG.drive install directory from a Steam library path. - Hardened
libraryfolders.vdfparsing by adding null checks and safer access to theappsnode before attempting detection. - Switched Linux detection to use the new resolver and (per PR intent) improve diagnosability.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
kccricket
added a commit
to kccricket/BeamMP-Launcher
that referenced
this pull request
Jul 8, 2026
Steam's libraryfolders.vdf can record a library path with different casing than what's actually on disk (e.g. /mnt/hdd vs /mnt/HDD), which made exact-case existence checks fail silently and left BeamNG.drive undetected. Resolve each path segment case-insensitively as a fallback, harden the VDF parsing against missing keys, and add a few more known Steam install locations (native ~/.local/share/Steam, Debian package, flatpak XDG data layout). Incorporates and fixes upstream PR BeamMP#259 by SCPLEGION, addressing review issues flagged on that PR (unguarded empty path falling back to cwd, and using is_regular_file instead of exists for integrity.json). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CiJCjUHz8i7dSFiBek6XGq
IrPgFKS0
added a commit
to IrPgFKS0/BeamMP-Launcher
that referenced
this pull request
Jul 9, 2026
…st download site - ServerSend keeps lowercase 'e' events on UDP (skip the >1KB TCP upgrade), BeamMP-Launcher#253 -- pairs with the mod/server UDP-event set. - Atomic tmp+rename on the one remaining direct mod-copy site so BeamNG never mounts a half-written zip (BeamMP-Launcher#250; the fork already did this at the other download sites). (BeamMP#244 int-cast already present; Linux PRs BeamMP#223/BeamMP#247/BeamMP#259 skipped -- already present or not worth the launch-path risk.) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Steam's libraryfolders.vdf can record a library path with different casing than what's actually on disk (e.g. /mnt/hdd vs /mnt/HDD). On case-sensitive filesystems this made std::filesystem::exists() fail silently, so BeamNG.drive was never detected even when installed.
Changes:
Added TryResolveGameDir(): resolves a game's install path segment-by-segment, falling back to a case-insensitive directory scan when the exact-case path doesn't exist. Confirms success by checking for integrity.json in the resolved folder.
Added debug logging showing which Steam install/library path is being checked, to make future detection issues easier to diagnose.
Testing: verified against a library where the VDF path casing didn't match the actual mount point casing; BeamNG.drive is now detected correctly.
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.