Closed ahoppen closed 1 week ago
The recursive directory might have been created concurrently by another process between the check for fileExists and createDirectory(atPath: parent, …), causing createDirectory to fail even though we would have had the expected result.
fileExists
createDirectory(atPath: parent, …)
createDirectory
Ironically, I found this issue as a nondeterministic failure in Swift CI while fixing the same bug in swift-tools-support-core: https://github.com/swiftlang/swift-tools-support-core/pull/490
@swift-ci Please test
Addressed this issue in https://github.com/swiftlang/swift-foundation/pull/1033.
The recursive directory might have been created concurrently by another process between the check for
fileExists
andcreateDirectory(atPath: parent, …)
, causingcreateDirectory
to fail even though we would have had the expected result.Ironically, I found this issue as a nondeterministic failure in Swift CI while fixing the same bug in swift-tools-support-core: https://github.com/swiftlang/swift-tools-support-core/pull/490