Merge pull request #405 from ONLYOFFICE/bugfix/bug-53122
fixed bug 53122
This commit is contained in:
commit
951593bbe4
@ -515,6 +515,7 @@ namespace ASC.Files.Core.Data
|
|||||||
|
|
||||||
var toInsert = FilesDbContext.Tree
|
var toInsert = FilesDbContext.Tree
|
||||||
.Where(r => r.FolderId == toFolderId)
|
.Where(r => r.FolderId == toFolderId)
|
||||||
|
.OrderBy(r => r.Level)
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
foreach (var subfolder in subfolders)
|
foreach (var subfolder in subfolders)
|
||||||
@ -525,7 +526,7 @@ namespace ASC.Files.Core.Data
|
|||||||
{
|
{
|
||||||
FolderId = subfolder.Key,
|
FolderId = subfolder.Key,
|
||||||
ParentId = f.ParentId,
|
ParentId = f.ParentId,
|
||||||
Level = f.Level + 1
|
Level = subfolder.Value + 1 + f.Level
|
||||||
};
|
};
|
||||||
FilesDbContext.AddOrUpdate(r => r.Tree, newTree);
|
FilesDbContext.AddOrUpdate(r => r.Tree, newTree);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user