Skip to content

Commit

Permalink
umu_util: fix steam game detection logic
Browse files Browse the repository at this point in the history
  • Loading branch information
R1kaB3rN committed Jul 4, 2024
1 parent 1551e45 commit 8f75fb5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion umu/umu_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,15 @@ def find_steam_wdir(path: Path) -> str:
subdir: Path
common_parts: tuple[str, ...]
path_parts: tuple[str, ...] = path.parts
is_steam: bool = False

# Executable is not a Steam game
if not path.match("steamapps/common"):
for parent in path.parents:
if parent.name == "common" and parent.parent.name == "steamapps":
is_steam = True
break

if not is_steam:
log.debug("Executable '%s' is not a Steam game", path)
return ""

Expand Down

0 comments on commit 8f75fb5

Please sign in to comment.