From 81c437ce9c7219c54a26643522f00cc02dfbde57 Mon Sep 17 00:00:00 2001 From: FazziCLAY Date: Wed, 17 Sep 2025 17:39:11 +0300 Subject: [PATCH] fix: delete excels dir before attempt to create --- main.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.py b/main.py index 41082fb..f78a644 100644 --- a/main.py +++ b/main.py @@ -166,6 +166,11 @@ faileds = [] def main(): t = utils.StepTimeCounter() try: + try: + shutil.rmtree(DIRNAME) + print(f"Directory '{DIRNAME}' and its contents deleted successfully.") + except Exception as e: + print(f"Error deleting directory '{DIRNAME}': {e}") os.mkdir(DIRNAME) print(f"Directory '{DIRNAME}' created successfully.") except Exception as e: