diff options
author | Diva Canto | 2015-06-01 15:11:30 -0700 |
---|---|---|
committer | Diva Canto | 2015-06-01 15:11:30 -0700 |
commit | 7effd3b1584ec132a8ffa75f8769a010b2021279 (patch) | |
tree | 06418431701e2b3bb952649689e95e8bcf08f348 /OpenSim/Capabilities/Handlers/FetchInventory | |
parent | Improve configuration description for llCastRay V3. (diff) | |
download | opensim-SC-7effd3b1584ec132a8ffa75f8769a010b2021279.zip opensim-SC-7effd3b1584ec132a8ffa75f8769a010b2021279.tar.gz opensim-SC-7effd3b1584ec132a8ffa75f8769a010b2021279.tar.bz2 opensim-SC-7effd3b1584ec132a8ffa75f8769a010b2021279.tar.xz |
Mantis #7594. This should be functionally equivalent to what it was, but just in case mono has a bug in List<T>.Find, here is the Linq equivalent of distinct-ness.
Diffstat (limited to 'OpenSim/Capabilities/Handlers/FetchInventory')
-rw-r--r-- | OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs b/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs index 810096f..f968fdc 100644 --- a/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs +++ b/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs | |||
@@ -28,6 +28,7 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections; | 29 | using System.Collections; |
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using System.Linq; | ||
31 | using System.Reflection; | 32 | using System.Reflection; |
32 | using log4net; | 33 | using log4net; |
33 | using Nini.Config; | 34 | using Nini.Config; |
@@ -110,8 +111,7 @@ namespace OpenSim.Capabilities.Handlers | |||
110 | } | 111 | } |
111 | 112 | ||
112 | // Filter duplicate folder ids that bad viewers may send | 113 | // Filter duplicate folder ids that bad viewers may send |
113 | if (folders.Find(f => f.folder_id == llsdRequest.folder_id) == null) | 114 | folders = (List<LLSDFetchInventoryDescendents>)folders.GroupBy(f => f.folder_id).Select(n => n.First()); |
114 | folders.Add(llsdRequest); | ||
115 | } | 115 | } |
116 | 116 | ||
117 | if (folders.Count > 0) | 117 | if (folders.Count > 0) |