Skip to content

Commit

Permalink
Fix error handling issue
Browse files Browse the repository at this point in the history
When entering error callback, error is always occured.
  • Loading branch information
ataka committed Sep 17, 2015
1 parent feb8057 commit fcef423
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions ls2xs/NSFileManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@ import Foundation
extension NSFileManager {
func fileURLsInURL(URL: NSURL) -> [NSURL] {
let fileManager = NSFileManager.defaultManager()
let enumerator = fileManager.enumeratorAtURL(URL, includingPropertiesForKeys: [], options: .SkipsHiddenFiles) { URL, error in
if let error = error {
print("error: \(error)")
return false
}
return true
let enumerator = fileManager.enumeratorAtURL(URL, includingPropertiesForKeys: [], options: .SkipsHiddenFiles) { (URL: NSURL, error: NSError) in
print("error: \(error)")
return false
}

var URLs = [NSURL]()
Expand Down

0 comments on commit fcef423

Please sign in to comment.