diff options
author | Diva Canto | 2009-12-23 11:45:39 -0800 |
---|---|---|
committer | Diva Canto | 2009-12-23 11:45:39 -0800 |
commit | c27aa3749c093d87b7d3216e7045d9fab948b4e1 (patch) | |
tree | 4e193a396136ef5b488fdb18871208fbde478c6d /OpenSim/Framework/Communications | |
parent | Thank you kindly, Ziah for a patch that adds the channel to the class ChatEve... (diff) | |
download | opensim-SC_OLD-c27aa3749c093d87b7d3216e7045d9fab948b4e1.zip opensim-SC_OLD-c27aa3749c093d87b7d3216e7045d9fab948b4e1.tar.gz opensim-SC_OLD-c27aa3749c093d87b7d3216e7045d9fab948b4e1.tar.bz2 opensim-SC_OLD-c27aa3749c093d87b7d3216e7045d9fab948b4e1.tar.xz |
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.
Diffstat (limited to 'OpenSim/Framework/Communications')
-rw-r--r-- | OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs | 21 |
1 files changed, 20 insertions, 1 deletions
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 | |||
232 | /// <returns></returns> | 232 | /// <returns></returns> |
233 | public Dictionary<UUID, InventoryFolderImpl> RequestSelfAndDescendentFolders() | 233 | public Dictionary<UUID, InventoryFolderImpl> RequestSelfAndDescendentFolders() |
234 | { | 234 | { |
235 | return libraryFolders; | 235 | Dictionary<UUID, InventoryFolderImpl> fs = new Dictionary<UUID, InventoryFolderImpl>(); |
236 | fs.Add(ID, this); | ||
237 | List<InventoryFolderImpl> fis = TraverseFolder(this); | ||
238 | foreach (InventoryFolderImpl f in fis) | ||
239 | { | ||
240 | fs.Add(f.ID, f); | ||
241 | } | ||
242 | //return libraryFolders; | ||
243 | return fs; | ||
244 | } | ||
245 | |||
246 | private List<InventoryFolderImpl> TraverseFolder(InventoryFolderImpl node) | ||
247 | { | ||
248 | List<InventoryFolderImpl> folders = node.RequestListOfFolderImpls(); | ||
249 | List<InventoryFolderImpl> subs = new List<InventoryFolderImpl>(); | ||
250 | foreach (InventoryFolderImpl f in folders) | ||
251 | subs.AddRange(TraverseFolder(f)); | ||
252 | |||
253 | folders.AddRange(subs); | ||
254 | return folders; | ||
236 | } | 255 | } |
237 | } | 256 | } |
238 | } | 257 | } |