mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-24 23:36:04 +00:00
fix: a Steam target whose file is gone goes back to the app's exe (#2411)
* fix: a Steam target whose file is gone goes back to the app's exe A shortcut Target edited in Steam is kept across the client's restart on purpose, but it was kept even after the file it names disappeared. When the app's own exe already equalled the recorded proposal, nothing replaced the dead target: Steam started `System/launcher.exe`, Wine answered `err:steam:run_process Failed to create process ...: 2`, and the game never ran (#694, after #1644 and #2022 removed the two real causes). The merge now treats a target that is not a file as no edit at all and writes the listing's exe and StartIn. The check runs in the guest, where the shortcut's paths live. Fixes #694 * fix: keep a Steam target whose card is not mounted - The app recreates /mnt/droiddeck-sd and /mnt/bannerlator-sd before binding the card, so the mountpoint outlives a removed card. A target directly under one had an existing parent, so the missing-file repair overwrote the edited Exe and Start In and kept them overwritten. - The repair now needs the target's storage to be there: a card mountpoint that lists nothing is a card that is not in the device, and the edit is kept for when it returns. Extra Steam libraries under /mnt/droiddeck-lib/<id> get the same check. - test_a_steam_target_under_a_bare_card_mountpoint_is_kept fails without the check and asserts both fields; test_a_steam_target_under_a_mounted_card_goes_back_to_the_apps keeps the repair. * fix: repair a Steam target removed with its folder - A missing target is gone when its storage is mounted and either its folder is still there or it lives in a tree the app always has (internal store installs, the internal Steam library). An update that removes the whole game folder now repairs the shortcut. - Store volumes and added game folders are removable mounts too: /mnt/droiddeck-stores/<id> and /root/Games/<name> are checked for content before a target under them is treated as gone, so an unplugged volume keeps the edited Exe and Start In. - Tests: internal folder removed repairs both fields; a bare store mountpoint and a card mountpoint keep both; a mounted card still repairs. 84 tests pass. * fix: classify a Steam target by its resolved path - A target such as /root/Games/Stores/../../../mnt/droiddeck-sd/Other.exe matched the internal prefix and was repaired while the card was out. internal_target and removable_mount now normalize the path before choosing the storage class, so the decision follows the file the target resolves to; the kept text is unchanged. - test_a_steam_target_is_classified_by_its_resolved_path fails before the normalization (the edit is replaced) and keeps both fields after it. 85 tests pass.
This commit is contained in:
1 parent
ab023667a0
commit
2a51b044c5
3 files changed
+160
-3
No files matched your search
@@ -197,6 +197,13 @@ The appid Steam derives (CRC32 of the quoted exe plus the name, high bit set) is
|
||||
listing carries, so the live add and the writer never disagree. Uninstall removes the folder and the
|
||||
listing drops the entry; the live client is asked to remove it too.
|
||||
|
||||
`droiddeck-steam-shortcuts` merges each entry against the one Steam holds: a Target or Start In
|
||||
edited in Steam survives the client's restart. A target whose file is gone is not an edit to keep -
|
||||
it can only fail before the game starts - so the listing's exe replaces it, checked in the guest
|
||||
where the shortcut's paths live, as long as the folder holding it exists (a missing folder can be an
|
||||
unmounted card). #694 was a hand-typed Target that outlived the game update that removed its file,
|
||||
so every launch died with Wine's `Failed to create process ...: 2` before the game ran.
|
||||
|
||||
`Library.SteamGame.source` is `steam`, `gog`, `epic`, `amazon` or `added`; the Library shows it as
|
||||
a chip on every tile and in the hero, and filters by it.
|
||||
|
||||
|
||||
Reference in new issue
Block a user