Skip to content

Conversation

fsecada01
Copy link

To address a PermissionError on windows systems when invoking shutil.rmtree in directory_cleaner, the onerror function will change the permissions of the file to allow for write access.

This may provide a brief buffer when deleting directories and files recursely due to a possible race condition; if the write permission error is actually present, then the onerror logic activates. Else, it serves as a passthrough.

To address a `PermissionError` on windows systems when invoking `shutil.rmtree` in `directory_cleaner`, the `onerror` function will change the permissions of the file to allow for write access. 

This may provide a brief buffer when deleting directories and files recursely due to a possible race condition; if the write permission error is actually present, then the `onerror` logic activates. Else, it serves as a passthrough.
@fsecada01
Copy link
Author

Addresses #116. No further unit testing is needed. Adding build jobs to non-Linux platforms may be required via GH actions for subsequent PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants