Skip to content

Commit

Permalink
Use less strict proton detection method
Browse files Browse the repository at this point in the history
  • Loading branch information
koplo199 committed Jul 13, 2023
1 parent e949a5f commit 1474ea0
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions bottles/backend/utils/steam.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,7 @@ def is_proton(path: str) -> bool:
Checks if a directory is a Proton directory.
"""
toolmanifest = os.path.join(path, f"toolmanifest.vdf")
if not os.path.isfile(toolmanifest):
return False

f = open(toolmanifest, "r", errors="replace")
data = SteamUtils.parse_vdf(f.read())
compat_layer_name = data.get("manifest", {}) \
.get("compatmanager_layer_name", {})

return "proton" in compat_layer_name
return os.path.isfile(toolmanifest)

@staticmethod
def get_associated_runtime(path: str) -> str:
Expand Down

0 comments on commit 1474ea0

Please sign in to comment.