Fix potential missing file in Heroic importer

This commit is contained in:
kramo
2023-04-26 17:29:20 +02:00
parent d505705493
commit 6f273ab8a6

View File

@@ -115,7 +115,9 @@ def heroic_importer(win):
# Import GOG games
if not win.schema.get_boolean("heroic-import-gog"):
pass
elif (heroic_dir / "gog_store" / "installed.json").exists():
elif (heroic_dir / "gog_store" / "installed.json").exists() and (
heroic_dir / "gog_store" / "library.json"
).exists():
installed = json.load((heroic_dir / "gog_store" / "installed.json").open())
importer.total_queue += len(installed["installed"])