-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Windows: Implement attributesOfItem with _lstat #2016
Conversation
Foundation/FileManager.swift
Outdated
|
||
|
||
#if os(Windows) | ||
result[.type] = s.st_mode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems wrong as the s.st_mode
will include the file permissions, can it be unified with the let type = ...
on line 917?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yeah, that was incorrect. It should now properly get the file type.
Foundation/FileManager.swift
Outdated
|
||
|
||
#if os(Windows) | ||
result[.posixPermissions] = NSNumber(value: UInt64(s.st_mode & ~UInt16(ucrt.S_IFMT))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be worth adding an internal helper to mask s.st_mode
to file permissions as it seems to be used in a few places.
b556b46
to
c8b7627
Compare
@swift-ci test |
c8b7627
to
66e42e2
Compare
Actually reverted a line that wasn't supposed to be changed. It should compile now... |
@swift-ci please test |
66e42e2
to
9dce82c
Compare
Alright, fixed the UInt32/UInt16 thing for realsies this time. Should be good to go now. |
9dce82c
to
0ea3e4d
Compare
@swift-ci please test |
Requires #2015