suffix change in rename_all_folders()
This commit is contained in:
parent
5373d06e72
commit
572070b18f
@ -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,6 +437,9 @@ 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:
|
||||
if option == "PublisherID":
|
||||
new_folder_name += f"_duplicated"
|
||||
else:
|
||||
new_folder_name += f"_{publisher_id}"
|
||||
if folder_name == new_folder_name:
|
||||
rename_flag = False
|
||||
@ -443,6 +447,9 @@ class SettingsTab(ctk.CTkFrame):
|
||||
new_path = os.path.join(folder_path, new_folder_name)
|
||||
|
||||
while os.path.exists(new_path):
|
||||
if option == "PublishedID":
|
||||
new_folder_name += f"_duplicated"
|
||||
else:
|
||||
new_folder_name += f"_{publisher_id}"
|
||||
if folder_name == new_folder_name:
|
||||
rename_flag = False
|
||||
|
Loading…
Reference in New Issue
Block a user