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 <kode54@gmail.com>
This commit is contained in:
Christopher Snowhill 2025-02-19 14:53:47 -08:00
parent 293a159116
commit 959fdf69a3

View file

@ -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<Class> *classes = @[[NSURL class]];
NSDictionary *options = @{};
NSArray<NSURL*> *urls = [pboard readObjectsForClasses:classes options:options];
//[playlistLoader insertURLs:urls atIndex:row sort:YES];
[acceptedURLs addObjectsFromArray:urls];