1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-11 09:25:56 +00:00

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

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
}