瀏覽代碼

Only remove image file if it exists (#14302)

Tim Eisele 1 月之前
父節點
當前提交
aa05185917
共有 1 個文件被更改,包括 3 次插入2 次删除
  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