From c27aa3749c093d87b7d3216e7045d9fab948b4e1 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Wed, 23 Dec 2009 11:45:39 -0800
Subject: 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.
---
.../Communications/Cache/LibraryRootFolder.cs | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Framework')
diff --git a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
index 42e6510..74ba0a5 100644
--- a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
+++ b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
@@ -232,7 +232,26 @@ namespace OpenSim.Framework.Communications.Cache
///
public Dictionary RequestSelfAndDescendentFolders()
{
- return libraryFolders;
+ Dictionary fs = new Dictionary();
+ fs.Add(ID, this);
+ List fis = TraverseFolder(this);
+ foreach (InventoryFolderImpl f in fis)
+ {
+ fs.Add(f.ID, f);
+ }
+ //return libraryFolders;
+ return fs;
+ }
+
+ private List TraverseFolder(InventoryFolderImpl node)
+ {
+ List folders = node.RequestListOfFolderImpls();
+ List subs = new List();
+ foreach (InventoryFolderImpl f in folders)
+ subs.AddRange(TraverseFolder(f));
+
+ folders.AddRange(subs);
+ return folders;
}
}
}
--
cgit v1.1