From 81d37587854bcc73102f09cf49a9bf79eb71c298 Mon Sep 17 00:00:00 2001 From: JPVenson Date: Wed, 17 Apr 2024 18:45:31 +0200 Subject: [PATCH] #11289 Fixed cleanup task not checking for folders (#11311) --- .../Tasks/CleanupCollectionAndPlaylistPathsTask.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/CleanupCollectionAndPlaylistPathsTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/CleanupCollectionAndPlaylistPathsTask.cs index 812df81922..f1c4d9b472 100644 --- a/Emby.Server.Implementations/ScheduledTasks/Tasks/CleanupCollectionAndPlaylistPathsTask.cs +++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/CleanupCollectionAndPlaylistPathsTask.cs @@ -116,7 +116,7 @@ public class CleanupCollectionAndPlaylistPathsTask : IScheduledTask foreach (var linkedChild in folder.LinkedChildren) { var path = linkedChild.Path; - if (!File.Exists(path)) + if (Path.HasExtension(path) ? !File.Exists(path) : !Directory.Exists(path)) { _logger.LogInformation("Item in {FolderName} cannot be found at {ItemPath}", folder.Name, path); (itemsToRemove ??= new List()).Add(linkedChild);