added skip check

This commit is contained in:
Roy 2024-06-22 01:18:04 -07:00 committed by GitHub
parent c7edac533b
commit 548c4e41ff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -557,6 +557,10 @@ for launcher_name, folder in folder_names.items():
# Define the new path of the folder # Define the new path of the folder
new_path = os.path.join(compatdata_dir, str(appid)) new_path = os.path.join(compatdata_dir, str(appid))
# Check if the new path already exists
if os.path.exists(new_path):
print(f'{new_path} already exists. Skipping renaming.')
else:
# Rename the folder # Rename the folder
os.rename(current_path, new_path) os.rename(current_path, new_path)