Validate manifest installdir and recover install path via steam_appid probe#38
Open
weter11 wants to merge 1 commit into
Open
Validate manifest installdir and recover install path via steam_appid probe#38weter11 wants to merge 1 commit into
weter11 wants to merge 1 commit into
Conversation
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.
Motivation
installdirnames (e.g.App <id>) that no longer match the actual folder name, causing incorrect install path resolution and preflight failures.Description
parse_app_manifest_infoinsrc/library.rsto validate the derivedsteamapps/common/<installdir>before using it as the canonical install path. The validation checks for a matchingsteam_appid.txtor at least the presence of files in the folder.is_valid_install_path,probe_install_dir_by_appid, andrewrite_manifest_installdirhelpers tosrc/library.rsto perform the validation, probesteamapps/common/*/steam_appid.txtfor the app ID, and optionally rewrite the manifestinstalldirwhen a different folder name is recovered.steamapps/common/*/steam_appid.txtwhen the manifest-derived path is invalid, and use the recovered folder as the canonical install path (mirrorsSteamClient::probe_install_dir_by_appidstrategy insrc/steam_client.rs).tests/library_scan_fallback.rswhich simulates a manifest withinstalldir = "App 2410180"while the actual folder isPortal Prelude RTXcontainingsteam_appid.txt = 2410180, asserting the scan resolves to the real folder and that the manifest is rewritten.Testing
cargo fmt --allwhich completed successfully.cargo test --test library_scan_fallback --test path_resolutionand both tests completed successfully (all ran and passed).Codex Task