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.

fsassets
Diva Canto 2015-06-01 15:11:30 -07:00
parent 897c7e1bda
commit 7effd3b158
1 changed files with 2 additions and 2 deletions

View File

@ -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<LLSDFetchInventoryDescendents>)folders.GroupBy(f => f.folder_id).Select(n => n.First());
}
if (folders.Count > 0)