Do not take whole path as version for esync check

This commit is contained in:
Mathieu Comandon 2019-11-03 18:38:47 -08:00
parent d2844b238e
commit 60a2d15e3e

View file

@ -234,7 +234,11 @@ def is_version_esync(path):
Returns:
bool: True is the build is Esync capable
"""
version = path.lower()
try:
version = path.split("/")[-2].lower()
except IndexError:
logger.error("Invalid path %s", path)
return False
if "esync" in version or "lutris" in version or "proton" in version:
return True