diff options
Diffstat (limited to 'MediaBrowser.Api/LibraryService.cs')
| -rw-r--r-- | MediaBrowser.Api/LibraryService.cs | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/MediaBrowser.Api/LibraryService.cs b/MediaBrowser.Api/LibraryService.cs index 55ee454d2..cf62e42ba 100644 --- a/MediaBrowser.Api/LibraryService.cs +++ b/MediaBrowser.Api/LibraryService.cs @@ -465,13 +465,16 @@ namespace MediaBrowser.Api if (item.LocationType == LocationType.FileSystem) { - if (Directory.Exists(item.Path)) + foreach (var path in item.GetDeletePaths().ToList()) { - Directory.Delete(item.Path, true); - } - else if (File.Exists(item.Path)) - { - File.Delete(item.Path); + if (Directory.Exists(path)) + { + Directory.Delete(path, true); + } + else if (File.Exists(path)) + { + File.Delete(path); + } } if (parent != null) |
