feat: support multiple Steam installations and duplicate game detection#4
Merged
feat: support multiple Steam installations and duplicate game detection#4
Conversation
- 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
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.
one, so both native and Flatpak Steam installs (and any others) are checked
every Steam root, deduplicating by canonical path so symlinked roots don't
produce duplicate results
for a game kind instead of stopping at the first match
deduplicates game paths by canonical path, so the same physical install
discovered via two different Steam roots appears only once
in two different Steam libraries), all installations are reported and the
welcome page shows a disambiguation header prompting the user to choose
tests covering duplicate detection, same-path deduplication, and
inaccessible deduplication across roots
https://claude.ai/code/session_01SVQyzKC2hi2AUENDkUjp9V