mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 03:26:07 +02:00
consolidated some file system access
This commit is contained in:
parent
16e9a7e42f
commit
2d0c51071a
1 changed files with 4 additions and 2 deletions
|
@ -84,12 +84,14 @@ namespace MediaBrowser.Controller.Providers
|
||||||
// If the IBN location exists return the last modified date of any file in it
|
// If the IBN location exists return the last modified date of any file in it
|
||||||
var location = GetLocation(item);
|
var location = GetLocation(item);
|
||||||
|
|
||||||
if (!Directory.Exists(location))
|
var directoryInfo = new DirectoryInfo(location);
|
||||||
|
|
||||||
|
if (!directoryInfo.Exists)
|
||||||
{
|
{
|
||||||
return DateTime.MinValue;
|
return DateTime.MinValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
var files = new DirectoryInfo(location).EnumerateFiles().ToList();
|
var files = directoryInfo.EnumerateFiles().ToList();
|
||||||
|
|
||||||
if (files.Count == 0)
|
if (files.Count == 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue