Skip to content

Commit

Permalink
Fix path to proton detection
Browse files Browse the repository at this point in the history
Proton can be installed into one of `LibraryFolders` listed in
`${HOME}/.local/share/Steam/steamapps/libraryfolders.vdf`,
but not in one detected from `STEAM_COMPAT_CLIENT_INSTALL_PATH`
or `STEAM_COMPAT_DATA_PATH`.

Meanwhile full path to `proton` present in `sys.argv[0]`.
  • Loading branch information
pchome authored Oct 9, 2018
1 parent 4ad47d3 commit bcf30c9
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions protonfixes/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,8 @@ def protondir():
""" Returns the path to proton
"""

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
proton_dir = '/'.join(sys.argv[0].split('/')[:-1])
return proton_dir


def protonprefix():
Expand Down

0 comments on commit bcf30c9

Please sign in to comment.