aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveUtils.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveUtils.cs')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveUtils.cs19
1 files changed, 15 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveUtils.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveUtils.cs
index e7fb43a..0d90a15 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveUtils.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveUtils.cs
@@ -206,7 +206,18 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
206 else 206 else
207 return null; 207 return null;
208 } 208 }
209 209
210 public static List<InventoryItemBase> FindItemsByPath(
211 IInventoryService inventoryService, UUID userId, string path)
212 {
213 InventoryFolderBase rootFolder = inventoryService.GetRootFolder(userId);
214
215 if (null == rootFolder)
216 return new List<InventoryItemBase>();
217
218 return FindItemsByPath(inventoryService, rootFolder, path);
219 }
220
210 /// <summary> 221 /// <summary>
211 /// Find items that match a given PATH_DELIMITOR delimited path starting from this folder. 222 /// Find items that match a given PATH_DELIMITOR delimited path starting from this folder.
212 /// </summary> 223 /// </summary>
@@ -239,11 +250,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
239 if (components.Length == 1) 250 if (components.Length == 1)
240 { 251 {
241// m_log.DebugFormat( 252// m_log.DebugFormat(
242// "FOUND SINGLE COMPONENT [{0}]. Looking for this in [{1}] {2}", 253// "FOUND SINGLE COMPONENT [{0}]. Looking for this in [{1}] {2}",
243// components[0], startFolder.Name, startFolder.ID); 254// components[0], startFolder.Name, startFolder.ID);
244 255
245 List<InventoryItemBase> items = inventoryService.GetFolderItems(startFolder.Owner, startFolder.ID); 256 List<InventoryItemBase> items = inventoryService.GetFolderItems(startFolder.Owner, startFolder.ID);
246 257
247// m_log.DebugFormat("[INVENTORY ARCHIVE UTILS]: Found {0} items in FindItemByPath()", items.Count); 258// m_log.DebugFormat("[INVENTORY ARCHIVE UTILS]: Found {0} items in FindItemByPath()", items.Count);
248 259
249 foreach (InventoryItemBase item in items) 260 foreach (InventoryItemBase item in items)
@@ -257,7 +268,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
257 else 268 else
258 { 269 {
259// m_log.DebugFormat("FOUND COMPONENTS [{0}] and [{1}]", components[0], components[1]); 270// m_log.DebugFormat("FOUND COMPONENTS [{0}] and [{1}]", components[0], components[1]);
260 271
261 InventoryCollection contents = inventoryService.GetFolderContent(startFolder.Owner, startFolder.ID); 272 InventoryCollection contents = inventoryService.GetFolderContent(startFolder.Owner, startFolder.ID);
262 273
263 foreach (InventoryFolderBase folder in contents.Folders) 274 foreach (InventoryFolderBase folder in contents.Folders)