From f2aed618319f45f9e8fce1fa57161567df1d4628 Mon Sep 17 00:00:00 2001 From: Jeremy Rimpo Date: Tue, 12 Sep 2023 16:18:33 -0500 Subject: [PATCH] Return if install_path doesn't exist --- eadesktop_utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eadesktop_utils.py b/eadesktop_utils.py index 4fc3597..52757f0 100644 --- a/eadesktop_utils.py +++ b/eadesktop_utils.py @@ -45,6 +45,9 @@ def find_games() -> Dict[str, Path]: install_path = Path(os.environ["ProgramW6432"]) / "EA Games" config.set("mod_organizer", "user.downloadinplacedir", install_path.__str__()) + if not install_path.exists(): + return games + for game_dir in install_path.iterdir(): try: installer_file = game_dir.joinpath("__Installer", "installerdata.xml")