Skip to content

Commit a93421d

Browse files
committed
Update FileManagerTests.swift
1 parent 7e97e30 commit a93421d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Tests/FoundationEssentialsTests/FileManager/FileManagerTests.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,9 +1072,10 @@ private struct FileManagerTests {
10721072
guard let posix = error.underlying as? POSIXError else { throw error }
10731073
#if canImport(Darwin)
10741074
// .ENOTSUP is Darwin-specific.
1075-
guard posix.code == .ENOTSUP || posix.code == .EOPNOTSUPP else { throw error }
1075+
guard posix.code == .ENOTSUP || posix.code == .EOPNOTSUPP || posix.code == .EPERM else { throw error }
10761076
#else
1077-
guard posix.code == .EOPNOTSUPP else { throw error }
1077+
// .EPERM can occur on Linux if xattrs on symlinks aren't permitted.
1078+
guard posix.code == .EOPNOTSUPP || posix.code == .EPERM else { throw error }
10781079
#endif
10791080
return
10801081
}

0 commit comments

Comments
 (0)