Skip to content

Prefer the Steam library that owns the appmanifest when resolving a game path - #227

Open
rouges78 wants to merge 1 commit into
mainfrom
fix/steam-install-path-leftover-folder
Open

rouges78 wants to merge 1 commit into
mainfrom
fix/steam-install-path-leftover-folder

Conversation

@rouges78

Copy link
Copy Markdown
Owner

What changed

find_game_install_path (src-tauri/src/commands/steam_enhanced.rs) now looks first for the Steam library whose appmanifest_*.acf declares the requested installdir, and returns that folder. The previous search (main library, secondary libraries, normalized name match, guessed D:\ / E:\ paths) is kept as the fallback.

The new helper manifest_backed_install_path compares names with the existing normalize_install_dir, so it also works when the caller passes the game name instead of the folder name.

Why

The function returned the first folder that existed, starting from the main Steam library. Steam leaves non-Steam files behind on uninstall, so a leftover folder with the same name won over the real install in a secondary library.

Measured on Danganronpa: Trigger Happy Havoc: the game is installed in a secondary library, but the main library still had a same-named folder holding only old .gsbackup files and an extracted test directory. The one-click translate page scanned that folder, found a single stray file with 52 strings, and ended with "no strings translated".

Testing

  • New unit test appmanifest_batte_la_cartella_residua reproduces the case with two fake libraries in a temp dir.
  • cargo test --bin gamestringer tests_install_path: 3 passed.

Reviewer notes

  • Not verified in the running app: the dev build was open and held gamestringer.exe, so only the unit tests ran.
  • That this function is where the wrong path came from is inferred from the game-detail entry point, not traced end to end in the app.
  • The lookup reads every appmanifest_*.acf in each library on every call (small files, one per installed game).
  • docs/METODI-DI-TRADUZIONE.md gets an entry describing the finding, as the project conventions require.

🤖 Generated with Claude Code

…ame path

find_game_install_path returned the first existing folder, starting from
the main Steam library. A leftover folder with the same name (backups and
test files Steam does not remove on uninstall) won over the real install
in a secondary library, so Danganronpa was scanned in the wrong place and
ended with "no strings translated".

Look up the library whose appmanifest declares that installdir first, and
fall back to the previous search otherwise.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant