From 289c21099cf3ce0a2e3392436541b67d0961d8e8 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 24 Aug 2010 16:50:31 +0100 Subject: Add automated test at the opensim 'api' level to check that a given item goes to the correct directory Also removes some mono compiler warnings --- OpenSim/Services/InventoryService/InventoryService.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'OpenSim/Services/InventoryService/InventoryService.cs') diff --git a/OpenSim/Services/InventoryService/InventoryService.cs b/OpenSim/Services/InventoryService/InventoryService.cs index fbcd663..86bca79 100644 --- a/OpenSim/Services/InventoryService/InventoryService.cs +++ b/OpenSim/Services/InventoryService/InventoryService.cs @@ -268,15 +268,22 @@ namespace OpenSim.Services.InventoryService public InventoryFolderBase GetFolderForType(UUID userID, AssetType type) { +// m_log.DebugFormat("[INVENTORY SERVICE]: Looking for folder type {0} for user {1}", type, userID); + InventoryFolderBase root = m_Database.getUserRootFolder(userID); if (root != null) { List folders = RequestSubFolders(root.ID); foreach (InventoryFolderBase folder in folders) - { + { if (folder.Type == (short)type) + { +// m_log.DebugFormat( +// "[INVENTORY SERVICE]: Found folder {0} type {1}", folder.Name, (AssetType)folder.Type); + return folder; + } } } -- cgit v1.1