Skip to content

Commit 4661c85

Browse files
committedDec 16, 2024·
Blindly trust ~/.steam/steam (#69)
Ammo now requires this folder to exist. It's okay if it's a symlink to the folder that contains steamapps.
1 parent 25eb748 commit 4661c85

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed
 

‎ammo/controller/game.py

+3-11
Original file line numberDiff line numberDiff line change
@@ -169,17 +169,9 @@ def __init__(self, args):
169169
# ~/.steam/steam is a symlink usually pointing to ~/.local/share/Steam,
170170
# but the location it points to might be different for unknown reasons.
171171
# Trust the symlink location to point to the correct steam install location.
172-
if all(
173-
(
174-
(steam := Path.home() / ".steam" / "steam").exists(),
175-
steam.is_symlink(),
176-
steam.readlink().exists(),
177-
)
178-
):
179-
self.steam = (Path.home() / ".steam" / "steam").resolve() / "steamapps"
180-
else:
181-
# The symlink at ~/.steam/steam was broken. Fallback to a sane default.
182-
self.steam = Path.home() / ".local/share/Steam/steamapps"
172+
# It might not be a symlink at all, steam might just be installed here.
173+
# Permit the absence of it too, in case users only use flatpak.
174+
self.steam = (Path.home() / ".steam" / "steam").resolve() / "steamapps"
183175
self.flatpak = (
184176
Path.home()
185177
/ ".var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps"

0 commit comments

Comments
 (0)
Please sign in to comment.