Update NSLGameScanner.py

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

View File

@ -620,17 +620,18 @@ for launcher_name, folder in folder_names.items():
else: else:
print(f'{new_path} already exists and is not empty. Skipping renaming and symlinking.') print(f'{new_path} already exists and is not empty. Skipping renaming and symlinking.')
continue # skip to the next iteration continue # skip to the next iteration
# Rename the folder
os.rename(current_path, new_path)
print(f"Renamed {current_path} to {new_path}")
# Define the path of the symbolic link # Rename the folder
symlink_path = os.path.join(compatdata_dir, folder) os.rename(current_path, new_path)
print(f"Symlink path for {launcher_name}: {symlink_path}") print(f"Renamed {current_path} to {new_path}")
# Create a symbolic link to the renamed folder # Define the path of the symbolic link
os.symlink(new_path, symlink_path) symlink_path = os.path.join(compatdata_dir, folder)
print(f"Created symlink at {symlink_path} to {new_path}") print(f"Symlink path for {launcher_name}: {symlink_path}")
# Create a symbolic link to the renamed folder
os.symlink(new_path, symlink_path)
print(f"Created symlink at {symlink_path} to {new_path}")
else: else:
print(f'App ID for {launcher_name} is not available yet.') print(f'App ID for {launcher_name} is not available yet.')
else: else: