Update NSLGameScanner.py

This commit is contained in:
Roy 2024-06-22 03:45:57 -07:00 committed by GitHub
parent 439b9a20e9
commit be11b4e04b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -596,6 +596,8 @@ if app_ids and not os.path.exists(non_steam_launchers_path):
else: else:
print('NonSteamLaunchers is symlinked to a different folder') print('NonSteamLaunchers is symlinked to a different folder')
else: else:
# Check if the current path exists
if os.path.exists(current_path):
# Define the new path of the NonSteamLaunchers folder # Define the new path of the NonSteamLaunchers folder
new_path = os.path.join(compatdata_dir, str(first_app_id)) new_path = os.path.join(compatdata_dir, str(first_app_id))
@ -607,6 +609,9 @@ if app_ids and not os.path.exists(non_steam_launchers_path):
# Create a symbolic link to the renamed NonSteamLaunchers folder # Create a symbolic link to the renamed NonSteamLaunchers folder
os.symlink(new_path, symlink_path) os.symlink(new_path, symlink_path)
else:
print(f"The directory {current_path} does not exist. Skipping.")
#End of Refactoring python code from .sh file #End of Refactoring python code from .sh file