Skip to content

[5.3] Return success from FileManager recursive directory creation even if a directory was created by another thread concurrently. #2833

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

Merged
merged 1 commit into from
Jul 9, 2020

Conversation

spevans
Copy link
Contributor

@spevans spevans commented Jun 24, 2020

If another thread creates one of the same directories in the target path, the !fileExists check may pass while the mkdir call fails with EEXIST. However, if the existing file is a directory, then that should still be a success.

Fixes SR-12272.

(cherry picked from commit b6eea02)

…f a directory was created by another thread concurrently.

If another thread creates one of the same directories in the target path, the `!fileExists` check may pass while the `mkdir` call fails with `EEXIST`. However, if the existing file is a directory, then that should still be a success.

Fixes [SR-12272](https://bugs.swift.org/browse/SR-12272).

(cherry picked from commit b6eea02)
@spevans
Copy link
Contributor Author

spevans commented Jun 24, 2020

@swift-ci test

@millenomi millenomi merged commit 71dd7a6 into swiftlang:release/5.3 Jul 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants