From a32d4bfd9de601afe853cae62a5dfb04e356e77e Mon Sep 17 00:00:00 2001 From: OddlyTimbot Date: Sat, 21 Sep 2024 21:32:25 -0400 Subject: [PATCH] remove files rather than overwrite --- user_updater.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_updater.py b/user_updater.py index 61778ff..27f0f60 100644 --- a/user_updater.py +++ b/user_updater.py @@ -16,7 +16,7 @@ def replace_word_in_files(target_word, replacement_word, folder_path=".", dest_p # Write the new content back to the file file_path = os.path.join(dest_path, filename) if os.path.exists(file_path): - os.remove(dst_file) + os.remove(file_path) with open(file_path, 'w') as file: file.write(new_content)