Only trash regular files

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
CQTexperiment
Christopher Snowhill 2022-02-10 21:48:08 -08:00
parent 5411a60ea1
commit 2e1460f72d
1 changed files with 6 additions and 4 deletions

View File

@ -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;
}
}
}