Skip to content

feat: support multiple Steam installations and duplicate game detection#4

Merged
astrovm merged 2 commits intomainfrom
claude/multi-steam-paths-Cap8j
Mar 26, 2026
Merged

feat: support multiple Steam installations and duplicate game detection#4
astrovm merged 2 commits intomainfrom
claude/multi-steam-paths-Cap8j

Conversation

@astrovm
Copy link
Copy Markdown
Owner

@astrovm astrovm commented Mar 26, 2026

  • steam_roots() now returns all valid Steam paths instead of just the first
    one, so both native and Flatpak Steam installs (and any others) are checked
  • library_folders_paths() reads all libraryfolders.vdf files found across
    every Steam root, deduplicating by canonical path so symlinked roots don't
    produce duplicate results
  • find_all_games_in_libraries() now collects every matching library folder
    for a game kind instead of stopping at the first match
  • detect_games_from_parsed_vdfs() merges results from all VDF roots and
    deduplicates game paths by canonical path, so the same physical install
    discovered via two different Steam roots appears only once
  • When the same game is found in multiple distinct locations (e.g. installed
    in two different Steam libraries), all installations are reported and the
    welcome page shows a disambiguation header prompting the user to choose
  • Inaccessible library entries are also deduplicated across roots
  • Add Hash to GameKind to support use in hash sets
  • Update all tests to match the new function signatures and add three new
    tests covering duplicate detection, same-path deduplication, and
    inaccessible deduplication across roots

https://claude.ai/code/session_01SVQyzKC2hi2AUENDkUjp9V

claude added 2 commits March 26, 2026 05:50
- steam_roots() now returns all valid Steam paths instead of just the first
  one, so both native and Flatpak Steam installs (and any others) are checked
- library_folders_paths() reads all libraryfolders.vdf files found across
  every Steam root, deduplicating by canonical path so symlinked roots don't
  produce duplicate results
- find_all_games_in_libraries() now collects every matching library folder
  for a game kind instead of stopping at the first match
- detect_games_from_parsed_vdfs() merges results from all VDF roots and
  deduplicates game paths by canonical path, so the same physical install
  discovered via two different Steam roots appears only once
- When the same game is found in multiple distinct locations (e.g. installed
  in two different Steam libraries), all installations are reported and the
  welcome page shows a disambiguation header prompting the user to choose
- Inaccessible library entries are also deduplicated across roots
- Add Hash to GameKind to support use in hash sets
- Update all tests to match the new function signatures and add three new
  tests covering duplicate detection, same-path deduplication, and
  inaccessible deduplication across roots

https://claude.ai/code/session_01SVQyzKC2hi2AUENDkUjp9V
Dead code removed:
- progress_page.rs and its mod.rs export: the AdventureModsProgressPage
  widget was never instantiated anywhere; setup_page.rs builds its own
  progress bar directly
- detect_games_from_vdf_with_extra_libraries is now #[cfg(test)] since it
  is only called from the also-test-only detect_games_from_vdf wrapper

VDF parser cleaned up:
- Eliminated parse_quoted_string_continue, which duplicated the inner loop
  of parse_quoted_string; combined into a single iterative method that
  tracks the current batch-copy start position, keeping the same
  slice-based optimization without the code duplication

Edge case tests added:
- vdf: unicode keys and values, empty string key, backslash at EOF
  (unterminated escape), consecutive escapes, Windows-style paths,
  CRLF line endings, comment before closing brace, map vs string type
- library: no VDF roots with game via extra_library, duplicate extra_library
  paths, game in both VDF and extra_library (dedup), library exists but
  game dir missing, game dir exists but no executable, SA2 sonic.exe
  fallback, empty roots + empty extra_libraries, SADX+SA2 in separate
  libraries within same VDF
- common: find_mod_root three levels deep (returns None), empty source
  dir in move_dir_contents, nested subdirectory move, proton_prefix with
  standard and shallow paths, find_file_icase case variants and missing
  cases, ModEntry dir_name fallback logic
- setup_page: initial_preview_index with no mods and no selection, all
  selections out of range with existing mods

https://claude.ai/code/session_01SVQyzKC2hi2AUENDkUjp9V
@astrovm astrovm merged commit ab018ac into main Mar 26, 2026
@astrovm astrovm deleted the claude/multi-steam-paths-Cap8j branch March 26, 2026 13:13
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.

2 participants