From 99485da7d89ca0c72c33e4a3e930e95d0df46ce0 Mon Sep 17 00:00:00 2001 From: derrod Date: Fri, 29 May 2020 23:52:26 +0200 Subject: [PATCH] [core] Reset EGL path if it is invalid --- legendary/core.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/legendary/core.py b/legendary/core.py index ff92e66..bcee155 100644 --- a/legendary/core.py +++ b/legendary/core.py @@ -53,6 +53,9 @@ class LegendaryCore: # on non-Windows load the programdata path from config if os.name != 'nt': self.egl.programdata_path = self.lgd.config.get('Legendary', 'egl_programdata', fallback=None) + if self.egl.programdata_path and not os.path.exists(self.egl.programdata_path): + self.log.error(f'Config EGL ProgramData path ("{self.egl.programdata_path}") is invalid! Please fix.') + self.egl.programdata_path = None self.local_timezone = datetime.now().astimezone().tzinfo self.language_code, self.country_code = ('en', 'US')