Skip to content

Commit

Permalink
Fixes #3: Proton in a non-default library path
Browse files Browse the repository at this point in the history
  • Loading branch information
simons-public committed Oct 9, 2018
1 parent dd679ec commit ff766fe
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions protonfixes/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,17 @@ def which(appname):
def protondir():
""" Returns the path to proton
"""

return glob.glob(os.path.join(
os.environ['STEAM_COMPAT_CLIENT_INSTALL_PATH'],
'steamapps/common/Proton*'))[0]

try:
proton_dir = glob.glob(os.path.join(
os.environ['STEAM_COMPAT_CLIENT_INSTALL_PATH'],
'steamapps/common/Proton*'))[0]
return proton_dir
except IndexError:
base = '/'.join(env['STEAM_COMPAT_DATA_PATH'].split('/')[:-2])
proton_dir = glob.glob(os.path.join(
base, 'common/Proton*'))[0]
return proton_dir


def protonprefix():
Expand Down

0 comments on commit ff766fe

Please sign in to comment.