Skip to content

Conversation

jmschonfeld
Copy link
Contributor

Per the CreateFileW documentation:

FILE_FLAG_BACKUP_SEMANTICS: You must set this flag to obtain a handle to a directory. A directory handle can be passed to some functions instead of a file handle.

This causes an error when attempting to read attributes of a directory (the API throws the .fileReadNoPermission error). This resolves an issue that prevents SwiftPM from functioning properly on Windows

@jmschonfeld
Copy link
Contributor Author

@swift-ci please test

Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@compnerd
Copy link
Member

Going to merge this to help unblock Windows work!

@compnerd compnerd merged commit 0086133 into swiftlang:main Jul 25, 2024
@compnerd
Copy link
Member

We should get this into the release/6.0 branch as well!

@jmschonfeld
Copy link
Contributor Author

We should get this into the release/6.0 branch as well!

Yep! @parkera is working on a merge from main to release/6.0 to pick up all the latest changes

@jmschonfeld jmschonfeld deleted the attributes-of-directory-windows branch July 25, 2024 23:13
compnerd pushed a commit to compnerd/swift-foundation that referenced this pull request Jul 25, 2024
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