mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-18 06:53:07 +03:00
more sync movement
This commit is contained in:
@@ -736,16 +736,27 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||
}
|
||||
|
||||
private UserRootFolder _userRootFolder;
|
||||
private readonly object _syncLock = new object();
|
||||
public Folder GetUserRootFolder()
|
||||
{
|
||||
if (_userRootFolder == null)
|
||||
{
|
||||
var userRootPath = ConfigurationManager.ApplicationPaths.DefaultUserViewsPath;
|
||||
lock (_syncLock)
|
||||
{
|
||||
if (_userRootFolder == null)
|
||||
{
|
||||
var userRootPath = ConfigurationManager.ApplicationPaths.DefaultUserViewsPath;
|
||||
|
||||
Directory.CreateDirectory(userRootPath);
|
||||
Directory.CreateDirectory(userRootPath);
|
||||
|
||||
_userRootFolder = GetItemById(GetNewItemId(userRootPath, typeof(UserRootFolder))) as UserRootFolder ??
|
||||
(UserRootFolder)ResolvePath(new DirectoryInfo(userRootPath));
|
||||
_userRootFolder = GetItemById(GetNewItemId(userRootPath, typeof(UserRootFolder))) as UserRootFolder;
|
||||
|
||||
if (_userRootFolder == null)
|
||||
{
|
||||
_userRootFolder = (UserRootFolder)ResolvePath(new DirectoryInfo(userRootPath));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return _userRootFolder;
|
||||
|
||||
Reference in New Issue
Block a user