mirror of
https://github.com/rmcrackan/Libation.git
synced 2026-10-20 12:45:06 -04:00
Fix FilePathCache NRE (#680)
This commit is contained in:
1 parent
668cd7dba8
commit
90eccbf2f6
1 file changed
+2
-2
@@ -56,11 +56,11 @@ namespace LibationFileManager
|
||||
?.FirstOrDefault()
|
||||
?.Path;
|
||||
|
||||
private static List<CacheEntry> getEntries(Func<CacheEntry, bool> predicate)
|
||||
private static IEnumerable<CacheEntry> getEntries(Func<CacheEntry, bool> predicate)
|
||||
{
|
||||
var entries = cache.Where(predicate).ToList();
|
||||
if (entries is null || !entries.Any())
|
||||
return null;
|
||||
return Enumerable.Empty<CacheEntry>();
|
||||
|
||||
remove(entries.Where(e => !File.Exists(e.Path)).ToList());
|
||||
|
||||
|
||||
Reference in new issue
Block a user