From b427eb2cb5d6b69e62fc25198e4e441acdf3d59a Mon Sep 17 00:00:00 2001 From: Roy <88516395+moraroy@users.noreply.github.com> Date: Sat, 22 Jun 2024 03:14:57 -0700 Subject: [PATCH] Update NSLGameScanner.py --- NSLGameScanner.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/NSLGameScanner.py b/NSLGameScanner.py index 3889eb5..2f288cc 100644 --- a/NSLGameScanner.py +++ b/NSLGameScanner.py @@ -600,8 +600,13 @@ if app_ids and not os.path.exists(non_steam_launchers_path): # Define the path of the symbolic link symlink_path = os.path.join(compatdata_dir, 'NonSteamLaunchers') - # Create a symbolic link to the renamed NonSteamLaunchers folder - os.symlink(new_path, symlink_path) + # Check if the symlink already exists + if not os.path.islink(symlink_path): + # Create a symbolic link to the renamed NonSteamLaunchers folder + os.symlink(new_path, symlink_path) + else: + print('Symlink for NonSteamLaunchers already exists') + #End of Refactoring python code from .sh file