diff --git a/video/out/cocoa/events_view.m b/video/out/cocoa/events_view.m index 3bf7bd44f4..f76ca0d617 100644 --- a/video/out/cocoa/events_view.m +++ b/video/out/cocoa/events_view.m @@ -313,23 +313,14 @@ - (BOOL)performDragOperation:(id )sender { NSPasteboard *pboard = [sender draggingPasteboard]; - if ([[pboard types] containsObject:NSURLPboardType]) { - NSArray *pbitems = [pboard readObjectsForClasses:@[[NSURL class]] - options:@{}]; - NSMutableArray* ar = [[[NSMutableArray alloc] init] autorelease]; - for (NSURL* url in pbitems) { - if ([url isFileURL]) { - [ar addObject:[url path]]; - } else { - [ar addObject:[url absoluteString]]; - } - } - [self.adapter handleFilesArray:ar]; - return YES; - } else if ([[pboard types] containsObject:NSFilenamesPboardType]) { + if ([[pboard types] containsObject:NSFilenamesPboardType]) { NSArray *pbitems = [pboard propertyListForType:NSFilenamesPboardType]; [self.adapter handleFilesArray:pbitems]; return YES; + } else if ([[pboard types] containsObject:NSURLPboardType]) { + NSURL *url = [NSURL URLFromPasteboard:pboard]; + [self.adapter handleFilesArray:@[[url absoluteString]]]; + return YES; } return NO; }