mirror of
https://github.com/lutris/lutris
synced 2024-11-02 08:20:51 +00:00
Check if manifests path exists before iterating over them
This commit is contained in:
parent
04697e8fd5
commit
8f44cc1b30
1 changed files with 5 additions and 0 deletions
|
@ -2,6 +2,8 @@
|
|||
import json
|
||||
import os
|
||||
|
||||
from lutris.util.log import logger
|
||||
|
||||
|
||||
class EGSLauncher:
|
||||
manifests_paths = 'ProgramData/Epic/EpicGamesLauncher/Data/Manifests'
|
||||
|
@ -11,6 +13,9 @@ class EGSLauncher:
|
|||
|
||||
def iter_manifests(self):
|
||||
manifests_path = os.path.join(self.prefix_path, 'drive_c', self.manifests_paths)
|
||||
if not os.path.exists(manifests_path):
|
||||
logger.warning("No valid path for EGS games manifests in %s", manifests_path)
|
||||
return
|
||||
for manifest in os.listdir(manifests_path):
|
||||
if not manifest.endswith(".item"):
|
||||
continue
|
||||
|
|
Loading…
Reference in a new issue