aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Communications')
-rw-r--r--OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs27
1 files changed, 27 insertions, 0 deletions
diff --git a/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs b/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs
index f78cdee..8e624f9 100644
--- a/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs
+++ b/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs
@@ -138,6 +138,33 @@ namespace OpenSim.Framework.Communications.Cache
138 return null; 138 return null;
139 } 139 }
140 140
141 public InventoryItemBase FindAsset(UUID assetID)
142 {
143 lock (Items)
144 {
145 foreach (InventoryItemBase item in Items.Values)
146 {
147 if (item.AssetID == assetID)
148 return item;
149 }
150 }
151
152 lock (SubFolders)
153 {
154 foreach (InventoryFolderImpl folder in SubFolders.Values)
155 {
156 InventoryItemBase item = folder.FindAsset(assetID);
157
158 if (item != null)
159 {
160 return item;
161 }
162 }
163 }
164
165 return null;
166 }
167
141 /// <summary> 168 /// <summary>
142 /// Deletes an item if it exists in this folder or any children 169 /// Deletes an item if it exists in this folder or any children
143 /// </summary> 170 /// </summary>