mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-22 01:54:42 +01:00
Added extra extension method that create a new instance of the destination object.
This commit is contained in:
@@ -730,10 +730,8 @@ namespace Emby.Server.Implementations.Library
|
||||
|
||||
_fileSystem.CreateDirectory(rootFolderPath);
|
||||
|
||||
var tmpAFolder = new AggregateFolder();
|
||||
((Folder)ResolvePath(_fileSystem.GetDirectoryInfo(rootFolderPath))).DeepCopy<Folder,AggregateFolder>(tmpAFolder);
|
||||
var rootFolder = GetItemById(GetNewItemId(rootFolderPath, typeof(AggregateFolder))) as AggregateFolder ?? tmpAFolder;
|
||||
|
||||
var rootFolder = GetItemById(GetNewItemId(rootFolderPath, typeof(AggregateFolder))) as AggregateFolder ?? ((Folder)ResolvePath(_fileSystem.GetDirectoryInfo(rootFolderPath))).DeepCopy<Folder,AggregateFolder>();
|
||||
|
||||
// In case program data folder was moved
|
||||
if (!string.Equals(rootFolder.Path, rootFolderPath, StringComparison.Ordinal))
|
||||
{
|
||||
@@ -801,8 +799,7 @@ namespace Emby.Server.Implementations.Library
|
||||
|
||||
if (tmpItem == null)
|
||||
{
|
||||
tmpItem = new UserRootFolder();
|
||||
((Folder)ResolvePath(_fileSystem.GetDirectoryInfo(userRootPath))).DeepCopy<Folder,UserRootFolder>(tmpItem);
|
||||
tmpItem = ((Folder)ResolvePath(_fileSystem.GetDirectoryInfo(userRootPath))).DeepCopy<Folder,UserRootFolder>();
|
||||
}
|
||||
|
||||
// In case program data folder was moved
|
||||
|
||||
Reference in New Issue
Block a user