Browse Source

Only remove image file if it exists (#14302)

Tim Eisele 1 tuần trước cách đây
mục cha
commit
aa05185917
1 tập tin đã thay đổi với 3 bổ sung2 xóa
  1. 3 2
      MediaBrowser.Controller/Entities/BaseItem.cs

+ 3 - 2
MediaBrowser.Controller/Entities/BaseItem.cs

@@ -2002,9 +2002,10 @@ namespace MediaBrowser.Controller.Entities
             }
 
             // Remove from file system
-            if (info.IsLocalFile)
+            var path = info.Path;
+            if (info.IsLocalFile && !string.IsNullOrWhiteSpace(path))
             {
-                FileSystem.DeleteFile(info.Path);
+                FileSystem.DeleteFile(path);
             }
 
             // Remove from item