From 6d15f25026ca6d19850cf4727ac8cc30667872e1 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Thu, 31 Jul 2008 18:32:57 +0000 Subject: * Allow an individual item to be specified as well as a folder in save-inv * No user functionality yet (and not for some time) --- OpenSim/Region/Application/OpenSimBase.cs | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 828abcb..c718c53 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -698,7 +698,7 @@ namespace OpenSim } InventoryFolderImpl inventoryFolder = null; - //InventoryItemBase inventoryItem = null; + InventoryItemBase inventoryItem = null; if (userInfo.HasReceivedInventory) { @@ -725,10 +725,11 @@ namespace OpenSim inventoryFolder = userInfo.RootFolder.FindFolderByPath(invPath); } -// if (inventoryFolder == null) -// { -// -// } + // The path may point to an item instead + if (inventoryFolder == null) + { + inventoryItem = userInfo.RootFolder.FindItemByPath(invPath); + } } else { @@ -736,15 +737,19 @@ namespace OpenSim return; } - if (null == inventoryFolder) + if (null != inventoryFolder) { - m_log.ErrorFormat("[CONSOLE]: Could not find folder with path {0}", invPath); - return; + m_log.InfoFormat("[CONSOLE]: Found folder {0} {1} at {2}", inventoryFolder.Name, inventoryFolder.ID, invPath); } - else + else if (null != inventoryItem) { - m_log.InfoFormat("[CONSOLE]: Found folder {0} {1} at {2}", inventoryFolder.Name, inventoryFolder.ID, invPath); + m_log.InfoFormat("[CONSOLE]: Found item {0} {1} at {2}", inventoryItem.Name, inventoryItem.ID, invPath); } + else + { + m_log.ErrorFormat("[CONSOLE]: Could not find inventory entry at path {0}", invPath); + return; + } } /// -- cgit v1.1