mirror of
https://github.com/rmcrackan/Libation.git
synced 2026-02-07 04:34:05 -05:00
Fix FilePathCache NRE (#680)
This commit is contained in:
@@ -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