Update NSLGameScanner.py

This commit is contained in:
Roy 2024-06-29 01:19:24 -07:00 committed by GitHub
parent f3b3936fa9
commit f7246960fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -613,14 +613,8 @@ for launcher_name, folder in folder_names.items():
# Check if the new path already exists
if os.path.exists(new_path):
# Check if the directory is empty
if not os.listdir(new_path):
print(f'{new_path} is empty. Deleting directory.')
os.rmdir(new_path)
print(f'{new_path} already exists. Skipping renaming and symlinking.')
else:
print(f'{new_path} already exists and is not empty. Skipping renaming and symlinking.')
continue # skip to the next iteration
# Rename the folder
os.rename(current_path, new_path)
print(f"Renamed {current_path} to {new_path}")
@ -639,6 +633,7 @@ for launcher_name, folder in folder_names.items():
# Define the appid for the custom shortcut
custom_app_id = 4206469918
print(f"App ID for the custom shortcut: {custom_app_id}")