|
15 | 15 | extension FileDescriptor { |
16 | 16 | public struct ControlFlags { |
17 | 17 | let rawValue: Int32 |
| 18 | + // Test stub |
| 19 | + public static var none: ControlFlags = ControlFlags(rawValue: 0) |
18 | 20 | // Out of scope of this sketch |
19 | 21 | } |
20 | 22 | } |
@@ -63,7 +65,7 @@ extension FilePath { |
63 | 65 | retryOnInterrupt: Bool |
64 | 66 | ) -> Result<FileStatus, Errno> { |
65 | 67 | var result = CInterop.Stat() |
66 | | - let fn = followSymlinks ? system_stat : system_lstat |
| 68 | + let fn = followSymlinks ? system_lstat : system_stat |
67 | 69 | return withPlatformString { ptr in |
68 | 70 | nothingOrErrno(retryOnInterrupt: retryOnInterrupt) { |
69 | 71 | fn(ptr, &result) |
@@ -177,7 +179,7 @@ extension FilePath { |
177 | 179 | followSymlinks: Bool, |
178 | 180 | retryOnInterrupt: Bool |
179 | 181 | ) -> Result<Void, Errno> { |
180 | | - let _chmod = followSymlinks ? system_chmod : system_lchmod |
| 182 | + let _chmod = followSymlinks ? system_lchmod : system_chmod |
181 | 183 | return withPlatformString { ptr in |
182 | 184 | nothingOrErrno(retryOnInterrupt: retryOnInterrupt) { |
183 | 185 | _chmod(ptr, permissions.rawValue) |
@@ -272,7 +274,7 @@ extension FilePath { |
272 | 274 | followSymlinks: Bool, |
273 | 275 | retryOnInterrupt: Bool |
274 | 276 | ) -> Result<Void, Errno> { |
275 | | - let _chown = followSymlinks ? system_chown : system_lchown |
| 277 | + let _chown = followSymlinks ? system_lchown : system_chown |
276 | 278 | return withPlatformString { ptr in |
277 | 279 | nothingOrErrno(retryOnInterrupt: retryOnInterrupt) { |
278 | 280 | _chown(ptr, userID, groupID) |
@@ -368,7 +370,7 @@ extension FilePath { |
368 | 370 | followSymlinks: Bool, |
369 | 371 | retryOnInterrupt: Bool |
370 | 372 | ) -> Result<Void, Errno> { |
371 | | - let _chflags = followSymlinks ? system_chflags : system_lchflags |
| 373 | + let _chflags = followSymlinks ? system_lchflags : system_chflags |
372 | 374 | return withPlatformString { ptr in |
373 | 375 | nothingOrErrno(retryOnInterrupt: retryOnInterrupt) { |
374 | 376 | _chflags(ptr, flags.rawValue) |
|
0 commit comments