-
-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
makedirs bug when multiprocessing #310
Comments
Like this....also the code is missing a permissions parameter in the second call to makedir.
|
That looks sensible. Would you mind submitting a PR? |
Fixed in v2.4.9 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have multiple processes writing different files to the same folder. To ensure the folder hierarchy exists I call makedirs(recreate=True) before I create the files. Sometimes this fails saying folder already exists. This is because of race condition where another process created it after the check.
The pyfilesystem code in base/makedirs has thread lock which stops this happening in threads. It also has a try except to ignore the exception for the lowest subfolder. However this should be around the creation of parent folders too:
The text was updated successfully, but these errors were encountered: