Explorar o código

Only remove image file if it exists (#14302)

Tim Eisele hai 1 semana
pai
achega
aa05185917
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  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