Update NSLGameScanner.py

This commit is contained in:
Roy 2024-06-22 03:14:57 -07:00 committed by GitHub
parent 9c923e9e96
commit b427eb2cb5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -600,8 +600,13 @@ if app_ids and not os.path.exists(non_steam_launchers_path):
# Define the path of the symbolic link # Define the path of the symbolic link
symlink_path = os.path.join(compatdata_dir, 'NonSteamLaunchers') symlink_path = os.path.join(compatdata_dir, 'NonSteamLaunchers')
# Create a symbolic link to the renamed NonSteamLaunchers folder # Check if the symlink already exists
os.symlink(new_path, symlink_path) 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 #End of Refactoring python code from .sh file