Skip to content

Fully enable posixPermissions attribute on Windows #733

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 15, 2024

Conversation

jmschonfeld
Copy link
Contributor

#730 enabled reading posixPermissions from files on Windows, and this PR enables setting permissions as well as the posixPermissions tests on Windows. On Windows, all files are readable and files cannot be made to be non-executable, so posixPermissions only handles indicating whether a file is read-only.

@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.

Thanks for implementing this!

@@ -563,18 +562,29 @@ final class FileManagerTests : XCTestCase {
File("666", attributes: [.posixPermissions: 0o666])
File("777", attributes: [.posixPermissions: 0o777])
}.test {
#if os(Windows)
// All files are readable on Windows
Copy link
Member

Choose a reason for hiding this comment

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

Well, there are unreadable files, just that the ACLing properties are far more complex.

@jmschonfeld jmschonfeld merged commit b58b051 into swiftlang:main Jul 15, 2024
3 checks passed
@jmschonfeld jmschonfeld deleted the windows/set-posix-perms branch July 15, 2024 19:25
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