From 7effd3b1584ec132a8ffa75f8769a010b2021279 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 1 Jun 2015 15:11:30 -0700 Subject: [PATCH] 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. --- .../Handlers/FetchInventory/FetchInvDescHandler.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs b/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs index 810096fa1e..f968fdccd9 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)