From 7effd3b1584ec132a8ffa75f8769a010b2021279 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 1 Jun 2015 15:11:30 -0700 Subject: Mantis #7594. This should be functionally equivalent to what it was, but just in case mono has a bug in List.Find, here is the Linq equivalent of distinct-ness. --- OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Capabilities/Handlers/FetchInventory') 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 @@ using System; using System.Collections; using System.Collections.Generic; +using System.Linq; using System.Reflection; using log4net; using Nini.Config; @@ -110,8 +111,7 @@ namespace OpenSim.Capabilities.Handlers } // Filter duplicate folder ids that bad viewers may send - if (folders.Find(f => f.folder_id == llsdRequest.folder_id) == null) - folders.Add(llsdRequest); + folders = (List)folders.GroupBy(f => f.folder_id).Select(n => n.First()); } if (folders.Count > 0) -- cgit v1.1