From eb04773c796bb5858ff37be6552f2ce088ee8f9a Mon Sep 17 00:00:00 2001 From: Gary Wilber Date: Sun, 27 Sep 2020 17:34:36 -0700 Subject: [PATCH] Use the get or add argument --- MediaBrowser.Controller/Providers/DirectoryService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MediaBrowser.Controller/Providers/DirectoryService.cs b/MediaBrowser.Controller/Providers/DirectoryService.cs index 73731783d..16fd1d42b 100644 --- a/MediaBrowser.Controller/Providers/DirectoryService.cs +++ b/MediaBrowser.Controller/Providers/DirectoryService.cs @@ -47,7 +47,7 @@ namespace MediaBrowser.Controller.Providers { var result = _fileCache.GetOrAdd(path, p => { - var file = _fileSystem.GetFileInfo(path); + var file = _fileSystem.GetFileInfo(p); return file != null && file.Exists ? file : null; }); @@ -70,7 +70,7 @@ namespace MediaBrowser.Controller.Providers _filePathCache.TryRemove(path, out _); } - return _filePathCache.GetOrAdd(path, p => _fileSystem.GetFilePaths(path).ToList()); + return _filePathCache.GetOrAdd(path, p => _fileSystem.GetFilePaths(p).ToList()); } } }