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.
parent
897c7e1bda
commit
7effd3b158
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue