mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-15 18:08:53 -07:00
Use the get or add argument
This commit is contained in:
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…
Reference in New Issue
Block a user