EGLSync: Don't test input in egl_path_edit on Windows
This commit is contained in:
parent
e6b67f50f7
commit
bcae6cb7fd
1 changed files with 6 additions and 7 deletions
|
@ -81,13 +81,12 @@ class EGLSyncGroup(QGroupBox, Ui_EGLSyncGroup):
|
|||
def egl_path_edit_edit_cb(path) -> Tuple[bool, str]:
|
||||
if not path:
|
||||
return True, path
|
||||
if platform.system() != "Windows":
|
||||
if os.path.exists(os.path.join(path, 'system.reg')) and os.path.exists(os.path.join(path, 'dosdevices/c:')):
|
||||
# path is a wine prefix
|
||||
path = os.path.join(path, 'dosdevices/c:', 'ProgramData/Epic/EpicGamesLauncher/Data/Manifests')
|
||||
elif not path.rstrip('/').endswith('ProgramData/Epic/EpicGamesLauncher/Data/Manifests'):
|
||||
# lower() might or might not be needed in the check
|
||||
return False, path
|
||||
if os.path.exists(os.path.join(path, 'system.reg')) and os.path.exists(os.path.join(path, 'dosdevices/c:')):
|
||||
# path is a wine prefix
|
||||
path = os.path.join(path, 'dosdevices/c:', 'ProgramData/Epic/EpicGamesLauncher/Data/Manifests')
|
||||
elif not path.rstrip('/').endswith('ProgramData/Epic/EpicGamesLauncher/Data/Manifests'):
|
||||
# lower() might or might not be needed in the check
|
||||
return False, path
|
||||
if os.path.exists(path):
|
||||
return True, path
|
||||
return False, path
|
||||
|
|
Loading…
Reference in a new issue