浏览代码

add suggested changes

Co-Authored-By: Bond-009 <bond.009@outlook.com>
dkanada 5 年之前
父节点
当前提交
623e85a9e4
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Emby.Server.Implementations/Library/LibraryManager.cs

+ 2 - 2
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
                 // Add this flag to GetDeletePaths if required in the future
                 var isRequiredForDelete = true;
                 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
                         try
                         {
                         {