From 7bb96611bb5d114b3beaa60b5911e56f8020173e Mon Sep 17 00:00:00 2001 From: Roy <88516395+moraroy@users.noreply.github.com> Date: Sat, 22 Jun 2024 23:44:05 -0700 Subject: [PATCH] Update NSLGameScanner.py --- NSLGameScanner.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/NSLGameScanner.py b/NSLGameScanner.py index d8b7236..8e71895 100644 --- a/NSLGameScanner.py +++ b/NSLGameScanner.py @@ -218,12 +218,14 @@ if os.path.exists(shortcuts_file): try: shortcuts = vdf.binary_loads(file.read()) except vdf.VDFError as e: - print(f"Error reading file: {e}") - shortcuts = create_empty_shortcuts() + print(f"Error reading file: {e}. The file might be corrupted or unreadable.") + print("Exiting the program. Please check the shortcuts.vdf file.") + sys.exit(1) else: print("The shortcuts.vdf file does not exist.") sys.exit(1) + # Open the config.vdf file with open(f"{logged_in_home}/.steam/root/config/config.vdf", 'r') as file: config_data = vdf.load(file)