We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4331805 commit 5277c2dCopy full SHA for 5277c2d
Foundation/NSFileManager.swift
@@ -246,10 +246,10 @@ public class NSFileManager : NSObject {
246
}
247
248
defer {
249
- closedir(dir)
+ closedir(dir!)
250
251
252
- while let entry = readdir(dir) {
+ while let entry = readdir(dir!) {
253
if let entryName = withUnsafePointer(&entry.pointee.d_name, { (ptr) -> String? in
254
return String(cString: UnsafePointer<Int8>(ptr))
255
}) {
@@ -286,10 +286,10 @@ public class NSFileManager : NSObject {
286
287
288
289
290
291
292
- var entry = readdir(dir)
+ var entry = readdir(dir!)
293
294
while entry != nil {
295
if let entryName = withUnsafePointer(&entry!.pointee.d_name, { (ptr) -> String? in
0 commit comments