Browse Source

Fix task CleanupCollectionAndPlaylistPathsTask removing valid paths (#11410)

John M 1 year ago
parent
commit
c791331952

+ 1 - 1
Emby.Server.Implementations/ScheduledTasks/Tasks/CleanupCollectionAndPlaylistPathsTask.cs

@@ -116,7 +116,7 @@ public class CleanupCollectionAndPlaylistPathsTask : IScheduledTask
         foreach (var linkedChild in folder.LinkedChildren)
         foreach (var linkedChild in folder.LinkedChildren)
         {
         {
             var path = linkedChild.Path;
             var path = linkedChild.Path;
-            if (Path.HasExtension(path) ? !File.Exists(path) : !Directory.Exists(path))
+            if (!File.Exists(path) && !Directory.Exists(path))
             {
             {
                 _logger.LogInformation("Item in {FolderName} cannot be found at {ItemPath}", folder.Name, path);
                 _logger.LogInformation("Item in {FolderName} cannot be found at {ItemPath}", folder.Name, path);
                 (itemsToRemove ??= new List<LinkedChild>()).Add(linkedChild);
                 (itemsToRemove ??= new List<LinkedChild>()).Add(linkedChild);