Use the get or add argument

pull/4222/head
Gary Wilber 4 years ago
parent 50c9083bc0
commit eb04773c79

@ -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());
}
}
}

Loading…
Cancel
Save