Closed Madhav-MKNC closed 1 year ago
Hi @Madhav-MKNC
Thanks for your suggestion, although for cases like this I would suggest you create a PR rather than paste the code in a comment.
Would you be interested on creating a PR with these changes? if so, here is the contributing guidelines file
Hey @patillacode Yes sure, I would like to submit a PR for sure.
If you get an error, don't use the flag. Easy as that.
Description The code currently deletes files and subdirectories using the shutil.rmtree function when the delete_existing flag is set to True. However, it does not handle any potential errors that may occur during the deletion process. This can result in unexpected behavior or unhandled exceptions, leaving the application in an inconsistent state.
Here's a suggested approach to handle errors during deletion: