This PR improves directory deletion on Windows by implementing a custom rmtree function to handle Windows-specific deletion errors. The changes include:
Implementing a custom rmtree function to handle Windows deletion errors
Replacing shutil.rmtree calls with the new rmtree utility function
Moving the __onerror handler to utils.py for centralized error handling
These changes should resolve issues related to directory deletion on Windows systems and improve overall reliability of the deletion process.
This PR improves directory deletion on Windows by implementing a custom rmtree function to handle Windows-specific deletion errors. The changes include:
These changes should resolve issues related to directory deletion on Windows systems and improve overall reliability of the deletion process.