From 572070b18f7b890fb8d4b69c5b5af4af9c7fc84a Mon Sep 17 00:00:00 2001 From: faroukbmiled Date: Tue, 26 Sep 2023 21:16:31 +0100 Subject: [PATCH] suffix change in rename_all_folders() --- boiiiwd_package/src/settings_tab.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/boiiiwd_package/src/settings_tab.py b/boiiiwd_package/src/settings_tab.py index 4b32789..233df0f 100644 --- a/boiiiwd_package/src/settings_tab.py +++ b/boiiiwd_package/src/settings_tab.py @@ -397,6 +397,7 @@ class SettingsTab(ctk.CTkFrame): def settings_check_for_updates(self): check_for_updates_func(self, ignore_up_todate=False) + # make this rename to {id}_duplicate as a fallback def rename_all_folders(self, option): boiiiFolder = main_app.app.edit_destination_folder.get() maps_folder = os.path.join(boiiiFolder, "mods") @@ -436,14 +437,20 @@ class SettingsTab(ctk.CTkFrame): folder_to_rename = os.path.join(folder_path, folder_name) new_folder_name = new_name while new_folder_name in processed_names: - new_folder_name += f"_{publisher_id}" + if option == "PublisherID": + new_folder_name += f"_duplicated" + else: + new_folder_name += f"_{publisher_id}" if folder_name == new_folder_name: rename_flag = False break new_path = os.path.join(folder_path, new_folder_name) while os.path.exists(new_path): - new_folder_name += f"_{publisher_id}" + if option == "PublishedID": + new_folder_name += f"_duplicated" + else: + new_folder_name += f"_{publisher_id}" if folder_name == new_folder_name: rename_flag = False break