mirror of
https://github.com/lutris/lutris
synced 2024-11-02 14:59:58 +00:00
Prophylactic code- don't fails too hard if Steam .VDFs are corrupt
We should be able to use WINE without Proton even if Steam is b0rked. This commit will cause Lutris to see no Proton locations at all if the Steam config is unreadable.
This commit is contained in:
parent
b8620311d7
commit
04c342b42a
1 changed files with 7 additions and 2 deletions
|
@ -36,10 +36,15 @@ def get_playonlinux():
|
|||
|
||||
def _iter_proton_locations():
|
||||
"""Iterate through all existing Proton locations"""
|
||||
for path in [os.path.join(p, "common") for p in steam().get_steamapps_dirs()]:
|
||||
try:
|
||||
steamapp_dirs = steam().get_steamapps_dirs()
|
||||
except:
|
||||
return # in case of corrupt or unreadable Steam configuration files!
|
||||
|
||||
for path in [os.path.join(p, "common") for p in steamapp_dirs]:
|
||||
if os.path.isdir(path):
|
||||
yield path
|
||||
for path in [os.path.join(p, "") for p in steam().get_steamapps_dirs()]:
|
||||
for path in [os.path.join(p, "") for p in steamapp_dirs]:
|
||||
if os.path.isdir(path):
|
||||
yield path
|
||||
|
||||
|
|
Loading…
Reference in a new issue