Merge pull request #10876 from Bond-009/cleanup

Fix incorrect path check in CleanupCollectionAndPlaylistPathsTask
This commit is contained in:
Bond-009 2024-01-16 22:34:59 +01:00 committed by GitHub
commit 0f26d870de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View File

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