From 2e1460f72da969aae2fbbb3465b56b753a550da7 Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Thu, 10 Feb 2022 21:48:08 -0800 Subject: [PATCH] Only trash regular files Signed-off-by: Christopher Snowhill --- Playlist/PlaylistController.m | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Playlist/PlaylistController.m b/Playlist/PlaylistController.m index 0f9870ea5..fc3ae2101 100644 --- a/Playlist/PlaylistController.m +++ b/Playlist/PlaylistController.m @@ -751,10 +751,12 @@ static inline void dispatch_sync_reentrant(dispatch_queue_t queue, dispatch_bloc [playbackController playlistDidChange:self]; for(PlaylistEntry *pe in objects) { - NSURL *removed = nil; - NSError *error = nil; - [[NSFileManager defaultManager] trashItemAtURL:pe.URL resultingItemURL:&removed error:&error]; - pe.trashURL = removed; + if([pe.URL isFileURL]) { + NSURL *removed = nil; + NSError *error = nil; + [[NSFileManager defaultManager] trashItemAtURL:pe.URL resultingItemURL:&removed error:&error]; + pe.trashURL = removed; + } } }