Change in how the Library returns its descendant folders, so that it includes folders added after the initial load off the file system, by other mechanisms.

mysql-performance
Diva Canto 2009-12-23 11:45:39 -08:00
parent fddefff284
commit c27aa3749c
1 changed files with 20 additions and 1 deletions

View File

@ -232,7 +232,26 @@ namespace OpenSim.Framework.Communications.Cache
/// <returns></returns>
public Dictionary<UUID, InventoryFolderImpl> RequestSelfAndDescendentFolders()
{
return libraryFolders;
Dictionary<UUID, InventoryFolderImpl> fs = new Dictionary<UUID, InventoryFolderImpl>();
fs.Add(ID, this);
List<InventoryFolderImpl> fis = TraverseFolder(this);
foreach (InventoryFolderImpl f in fis)
{
fs.Add(f.ID, f);
}
//return libraryFolders;
return fs;
}
private List<InventoryFolderImpl> TraverseFolder(InventoryFolderImpl node)
{
List<InventoryFolderImpl> folders = node.RequestListOfFolderImpls();
List<InventoryFolderImpl> subs = new List<InventoryFolderImpl>();
foreach (InventoryFolderImpl f in folders)
subs.AddRange(TraverseFolder(f));
folders.AddRange(subs);
return folders;
}
}
}