#11289 Fixed cleanup task not checking for folders (#11311)

This commit is contained in:
JPVenson 2024-04-17 18:45:31 +02:00 committed by GitHub
parent 1efddc4d87
commit 81d3758785
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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<LinkedChild>()).Add(linkedChild);