@@ -693,7 +693,7 @@ extension FileManager {
693
693
let ps = UnsafeMutablePointer< UnsafeMutablePointer< Int8>?> . allocate( capacity: 2 )
694
694
ps. initialize ( to: UnsafeMutablePointer ( mutating: fsRep) )
695
695
ps. advanced ( by: 1 ) . initialize ( to: nil )
696
- let stream = fts_open ( ps, FTS_PHYSICAL | FTS_XDEV | FTS_NOCHDIR, nil )
696
+ let stream = fts_open ( ps, FTS_PHYSICAL | FTS_XDEV | FTS_NOCHDIR | FTS_NOSTAT , nil )
697
697
ps. deinitialize ( count: 2 )
698
698
ps. deallocate ( )
699
699
@@ -1050,7 +1050,7 @@ internal func _contentsEqual(atPath path1: String, andPath path2: String) -> Boo
1050
1050
defer { ps. deallocate ( ) }
1051
1051
ps. initialize ( to: UnsafeMutablePointer ( mutating: fsRep) )
1052
1052
ps. advanced ( by: 1 ) . initialize ( to: nil )
1053
- return fts_open ( ps, FTS_PHYSICAL | FTS_XDEV | FTS_NOCHDIR, nil )
1053
+ return fts_open ( ps, FTS_PHYSICAL | FTS_XDEV | FTS_NOCHDIR | FTS_NOSTAT , nil )
1054
1054
}
1055
1055
if _stream == nil {
1056
1056
throw _NSErrorWithErrno ( errno, reading: true , url: url)
@@ -1106,13 +1106,13 @@ internal func _contentsEqual(atPath path1: String, andPath path2: String) -> Boo
1106
1106
fts_set ( _stream, _current, FTS_SKIP)
1107
1107
}
1108
1108
if showFile {
1109
- return URL ( fileURLWithPath: filename)
1109
+ return URL ( fileURLWithPath: filename, isDirectory : true )
1110
1110
}
1111
1111
1112
1112
case FTS_DEFAULT, FTS_F, FTS_NSOK, FTS_SL, FTS_SLNONE:
1113
1113
let ( showFile, _) = match ( filename: filename, to: _options, isDir: false )
1114
1114
if showFile {
1115
- return URL ( fileURLWithPath: filename)
1115
+ return URL ( fileURLWithPath: filename, isDirectory : false )
1116
1116
}
1117
1117
case FTS_DNR, FTS_ERR, FTS_NS:
1118
1118
let keepGoing : Bool
0 commit comments