diff options
| author | dkanada <dkanada@users.noreply.github.com> | 2019-12-14 22:34:18 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-12-14 22:34:18 +0900 |
| commit | 623e85a9e4472b8dd5b31574daf15e85866a25f7 (patch) | |
| tree | b653bb2c78898fa722b902b31589f4bd91b62ed6 /Emby.Server.Implementations/Library/LibraryManager.cs | |
| parent | 1b2453b4e90b90f19e0527f34f60912eb8ad9474 (diff) | |
add suggested changes
Co-Authored-By: Bond-009 <bond.009@outlook.com>
Diffstat (limited to 'Emby.Server.Implementations/Library/LibraryManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Library/LibraryManager.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index b03b7e67e..3bb07bc31 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -392,9 +392,9 @@ namespace Emby.Server.Implementations.Library // Add this flag to GetDeletePaths if required in the future var isRequiredForDelete = true; - foreach (var fileSystemInfo in item.GetDeletePaths().ToList()) + foreach (var fileSystemInfo in item.GetDeletePaths()) { - if (File.Exists(fileSystemInfo.FullName) || Directory.Exists(fileSystemInfo.FullName)) + if (fileSystemInfo.IsDirectory ? Directory.Exists(fileSystemInfo.FullName) : File.Exists(fileSystemInfo.FullName)) { try { |
