From 169c798bef88329f4ca4826e61ec400c97bf62d3 Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Wed, 19 Feb 2025 14:53:47 -0800 Subject: [PATCH] Bug Fix: Hopefully fix pasting a list of paths This should hopefully fix pasting from a list of file URLs. Signed-off-by: Christopher Snowhill --- Playlist/PlaylistView.m | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Playlist/PlaylistView.m b/Playlist/PlaylistView.m index 460df47a0..5b080dabd 100644 --- a/Playlist/PlaylistView.m +++ b/Playlist/PlaylistView.m @@ -463,11 +463,9 @@ static NSString *playlistSavedColumnsID = @"Playlist Saved Columns v0"; // Get files from a normal file drop (such as from Finder) if([bestType isEqualToString:NSPasteboardTypeFileURL]) { - NSMutableArray *urls = [[NSMutableArray alloc] init]; - - for(NSString *file in [pboard propertyListForType:NSPasteboardTypeFileURL]) { - [urls addObject:[NSURL fileURLWithPath:file]]; - } + NSArray *classes = @[[NSURL class]]; + NSDictionary *options = @{}; + NSArray *urls = [pboard readObjectsForClasses:classes options:options]; //[playlistLoader insertURLs:urls atIndex:row sort:YES]; [acceptedURLs addObjectsFromArray:urls];