File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
Tests/FoundationEssentialsTests/FileManager Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -1079,18 +1079,15 @@ private struct FileManagerTests {
10791079 throw error
10801080 }
10811081
1082- guard
1083- let linkAttrs = try ? fileManager. attributesOfItem ( atPath: " link " ) ,
1084- let targetAttrs = try ? fileManager. attributesOfItem ( atPath: " target " )
1085- else { return }
1082+ let linkAttrs = try fileManager. attributesOfItem ( atPath: " link " )
1083+ let targetAttrs = try fileManager. attributesOfItem ( atPath: " target " )
10861084
10871085 let linkXattrs = linkAttrs [ xattrKey] as? [ String : Data ]
10881086 let targetXattrs = targetAttrs [ xattrKey] as? [ String : Data ]
10891087
1090- // If neither reports xattrs, treat as unsupported on this FS/runtime.
1091- if linkXattrs == nil && targetXattrs == nil {
1092- return
1093- }
1088+ #require(
1089+ linkXattrs != nil || targetXattrs != nil ,
1090+ " Expected extended attributes after successful setAttributes call " )
10941091
10951092 // Prefer the symlink to carry the xattr; if the FS follows symlinks, accept target instead.
10961093 if let linkXattrs {
You can’t perform that action at this time.
0 commit comments