mirror of
https://github.com/derrod/legendary.git
synced 2024-12-22 17:55:27 +00:00
[cli] Catch exception if EGL path resolution fails
This commit is contained in:
parent
d3026672d1
commit
c53ac14c64
|
@ -87,10 +87,16 @@ class LegendaryCLI:
|
||||||
print('Path is invalid (does not exist)!')
|
print('Path is invalid (does not exist)!')
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
wine_folders = get_shell_folders(read_registry(egl_wine_pfx), egl_wine_pfx)
|
try:
|
||||||
egl_appdata = os.path.realpath(os.path.join(wine_folders['Local AppData'],
|
wine_folders = get_shell_folders(read_registry(egl_wine_pfx), egl_wine_pfx)
|
||||||
'EpicGamesLauncher', 'Saved',
|
egl_appdata = os.path.realpath(os.path.join(wine_folders['Local AppData'],
|
||||||
'Config', 'Windows'))
|
'EpicGamesLauncher', 'Saved',
|
||||||
|
'Config', 'Windows'))
|
||||||
|
except Exception as e:
|
||||||
|
logger.error(f'Got exception when trying to read WINE registry: {e!r}')
|
||||||
|
logger.error('Make sure you are specifying a valid wine prefix.')
|
||||||
|
exit(1)
|
||||||
|
|
||||||
if not os.path.exists(egl_appdata):
|
if not os.path.exists(egl_appdata):
|
||||||
logger.error(f'Wine prefix does not have EGL appdata path at "{egl_appdata}"')
|
logger.error(f'Wine prefix does not have EGL appdata path at "{egl_appdata}"')
|
||||||
exit(0)
|
exit(0)
|
||||||
|
|
Loading…
Reference in a new issue