From 90eccbf2f60a003b64b310aeb7c1b07c8ffbfba1 Mon Sep 17 00:00:00 2001 From: Mbucari Date: Mon, 17 Jul 2023 08:55:55 -0600 Subject: [PATCH] Fix FilePathCache NRE (#680) --- Source/LibationFileManager/FilePathCache.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/LibationFileManager/FilePathCache.cs b/Source/LibationFileManager/FilePathCache.cs index 78cd990e..9cf34adb 100644 --- a/Source/LibationFileManager/FilePathCache.cs +++ b/Source/LibationFileManager/FilePathCache.cs @@ -56,11 +56,11 @@ namespace LibationFileManager ?.FirstOrDefault() ?.Path; - private static List getEntries(Func predicate) + private static IEnumerable getEntries(Func predicate) { var entries = cache.Where(predicate).ToList(); if (entries is null || !entries.Any()) - return null; + return Enumerable.Empty(); remove(entries.Where(e => !File.Exists(e.Path)).ToList());