Only trash regular files
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This commit is contained in:
parent
5411a60ea1
commit
2e1460f72d
1 changed files with 6 additions and 4 deletions
|
@ -751,11 +751,13 @@ static inline void dispatch_sync_reentrant(dispatch_queue_t queue, dispatch_bloc
|
||||||
[playbackController playlistDidChange:self];
|
[playbackController playlistDidChange:self];
|
||||||
|
|
||||||
for(PlaylistEntry *pe in objects) {
|
for(PlaylistEntry *pe in objects) {
|
||||||
|
if([pe.URL isFileURL]) {
|
||||||
NSURL *removed = nil;
|
NSURL *removed = nil;
|
||||||
NSError *error = nil;
|
NSError *error = nil;
|
||||||
[[NSFileManager defaultManager] trashItemAtURL:pe.URL resultingItemURL:&removed error:&error];
|
[[NSFileManager defaultManager] trashItemAtURL:pe.URL resultingItemURL:&removed error:&error];
|
||||||
pe.trashURL = removed;
|
pe.trashURL = removed;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setSortDescriptors:(NSArray *)sortDescriptors {
|
- (void)setSortDescriptors:(NSArray *)sortDescriptors {
|
||||||
|
|
Loading…
Reference in a new issue