diff options
author | Justin Clark-Casey (justincc) | 2012-06-02 05:01:56 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-06-02 05:01:56 +0100 |
commit | 2de5479c3f0df84ab76365dc3a6eb618012c3153 (patch) | |
tree | 4b3f27f6a95224e6db08c24a651fedc219952aae /OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs | |
parent | Fix various issues with http inventory (diff) | |
download | opensim-SC-2de5479c3f0df84ab76365dc3a6eb618012c3153.zip opensim-SC-2de5479c3f0df84ab76365dc3a6eb618012c3153.tar.gz opensim-SC-2de5479c3f0df84ab76365dc3a6eb618012c3153.tar.bz2 opensim-SC-2de5479c3f0df84ab76365dc3a6eb618012c3153.tar.xz |
minor: tidy up some comments
Diffstat (limited to 'OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs')
-rw-r--r-- | OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs b/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs index b3196d9..1594c55 100644 --- a/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs +++ b/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs | |||
@@ -260,7 +260,7 @@ namespace OpenSim.Capabilities.Handlers | |||
260 | // descendents must only include the links, not the linked items we add | 260 | // descendents must only include the links, not the linked items we add |
261 | descendents = originalItems.Count; | 261 | descendents = originalItems.Count; |
262 | 262 | ||
263 | // Second, add target items for links in this folder | 263 | // Add target items for links in this folder before the links themselves. |
264 | foreach (InventoryItemBase item in originalItems) | 264 | foreach (InventoryItemBase item in originalItems) |
265 | { | 265 | { |
266 | if (item.AssetType == (int)AssetType.Link) | 266 | if (item.AssetType == (int)AssetType.Link) |
@@ -276,7 +276,7 @@ namespace OpenSim.Capabilities.Handlers | |||
276 | } | 276 | } |
277 | } | 277 | } |
278 | 278 | ||
279 | // First, scan for folder links and add target items in those folders. | 279 | // Now scan for folder links and insert the items they target and those links at the head of the return data |
280 | foreach (InventoryItemBase item in originalItems) | 280 | foreach (InventoryItemBase item in originalItems) |
281 | { | 281 | { |
282 | if (item.AssetType == (int)AssetType.LinkFolder) | 282 | if (item.AssetType == (int)AssetType.LinkFolder) |
@@ -284,10 +284,8 @@ namespace OpenSim.Capabilities.Handlers | |||
284 | InventoryCollection linkedFolderContents = m_InventoryService.GetFolderContent(ownerID, item.AssetID); | 284 | InventoryCollection linkedFolderContents = m_InventoryService.GetFolderContent(ownerID, item.AssetID); |
285 | List<InventoryItemBase> links = linkedFolderContents.Items; | 285 | List<InventoryItemBase> links = linkedFolderContents.Items; |
286 | 286 | ||
287 | // Second, insert the links contained in this linked folder. | ||
288 | itemsToReturn.InsertRange(0, links); | 287 | itemsToReturn.InsertRange(0, links); |
289 | 288 | ||
290 | // Third, insert the real items linked by the links in this linked folder. | ||
291 | foreach (InventoryItemBase link in linkedFolderContents.Items) | 289 | foreach (InventoryItemBase link in linkedFolderContents.Items) |
292 | { | 290 | { |
293 | // Take care of genuinely broken links where the target doesn't exist | 291 | // Take care of genuinely broken links where the target doesn't exist |