File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ public struct Dir {
124124 /// Enumerates the contents of the directory passing the name of each contained element to the provided callback.
125125 /// - parameter closure: The callback which will receive each entry's name
126126 /// - throws: `PerfectError.FileError`
127- public func forEachEntry( closure: ( name: String ) -> ( ) ) throws {
127+ public func forEachEntry( closure: ( name: String ) throws -> ( ) ) throws {
128128 guard let dir = opendir ( realPath) else {
129129 try ThrowFileError ( )
130130 }
@@ -159,9 +159,9 @@ public struct Dir {
159159 nameBuf. append ( 0 )
160160 if let name = String ( validatingUTF8: nameBuf) where !( name == " . " || name == " .. " ) {
161161 if Int32 ( type) == Int32 ( DT_DIR) {
162- closure ( name: name + " / " )
162+ try closure ( name: name + " / " )
163163 } else {
164- closure ( name: name)
164+ try closure ( name: name)
165165 }
166166 }
167167 }
You can’t perform that action at this time.
0 commit comments