Skip to content

Conversation

owenv
Copy link
Collaborator

@owenv owenv commented Jun 6, 2025

Capture and emit the underlying error

@owenv
Copy link
Collaborator Author

owenv commented Jun 6, 2025

@swift-ci test

@jakepetroules
Copy link
Collaborator

I wonder if the failures are due to Windows path length limitations.

Recursive directory creation (and only recursive directory creation) runs afoul of the path length limit because recursive mode uses SHCreateDirectoryExW with the full path and lets Win32 handle the intermediate directory creation, while non-recursive uses plain CreateDirectoryW. The \\?\ path prefix doesn't help with SHCreateDirectoryExW and long paths just fail anyways.

I documented this in the tests: https://github.com/swiftlang/swift-foundation/pull/1257/files#diff-1a0c3769fb737fce906a053a96566757ffd15da8a63224db73acd87592a563aaR1134

We should probably just switch swift-foundation to doing the recursion manually and always use CreateDirectoryW.

@owenv
Copy link
Collaborator Author

owenv commented Jun 6, 2025

I think we understand the underlying issue now but this is still nice to have

@owenv owenv merged commit c45116a into main Jun 6, 2025
24 checks passed
@owenv owenv deleted the owenv/attachment-error branch June 6, 2025 03:58
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.

2 participants