mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-22 16:54:46 +03:00
defer path creation when possible
This commit is contained in:
@@ -28,19 +28,14 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Configuration.UseCustomLibrary)
|
||||
var path = Configuration.UseCustomLibrary ? GetRootFolderPath(Name) : ConfigurationManager.ApplicationPaths.DefaultUserViewsPath;
|
||||
|
||||
if (!Directory.Exists(path))
|
||||
{
|
||||
var rootFolderPath = GetRootFolderPath(Name);
|
||||
|
||||
if (!Directory.Exists(rootFolderPath))
|
||||
{
|
||||
Directory.CreateDirectory(rootFolderPath);
|
||||
}
|
||||
|
||||
return rootFolderPath;
|
||||
Directory.CreateDirectory(path);
|
||||
}
|
||||
|
||||
return ConfigurationManager.ApplicationPaths.DefaultUserViewsPath;
|
||||
return path;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user