cocoa-cb: remove empty elements from dropped URLs

Fixes #6241
This commit is contained in:
Akemi 2018-10-25 19:39:59 +02:00 committed by Jan Ekström
parent 6ce570359a
commit 777a863bb6
1 changed files with 2 additions and 1 deletions

View File

@ -75,7 +75,8 @@ class EventsView: NSView {
return true
}
} else if types.contains(NSURLPboardType) {
if let url = pb.propertyList(forType: NSURLPboardType) as? [Any] {
if var url = pb.propertyList(forType: NSURLPboardType) as? [String] {
url = url.filter{ !$0.isEmpty }
EventsResponder.sharedInstance().handleFilesArray(url)
return true
}