Skip to content

Commit 8956f2e

Browse files
committed
Update FileManager+Files.swift
1 parent 00ab09a commit 8956f2e

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Sources/FoundationEssentials/FileManager/FileManager+Files.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -525,11 +525,8 @@ extension _FileManagerImpl {
525525
var size = listxattr(path, nil, 0, followSymlinks ? 0 : XATTR_NOFOLLOW)
526526
#elseif os(FreeBSD)
527527
var size = (followSymlinks ? extattr_list_file : extattr_list_link)(path, EXTATTR_NAMESPACE_USER, nil, 0)
528-
#elseif os(Linux)
529-
var size = followSymlinks ? listxattr(path, nil, 0) : llistxattr(path, nil, 0)
530528
#else
531-
// No way to follow symlinks.
532-
var size = listxattr(path, nil, 0)
529+
var size = followSymlinks ? listxattr(path, nil, 0) : llistxattr(path, nil, 0)
533530
#endif
534531
guard size > 0 else { return nil }
535532
let keyList = UnsafeMutableBufferPointer<CChar>.allocate(capacity: size)

0 commit comments

Comments
 (0)