* Allow an individual item to be specified as well as a folder in save-inv

* No user functionality yet (and not for some time)
0.6.0-stable
Justin Clarke Casey 2008-07-31 18:32:57 +00:00
parent 900a656420
commit 6d15f25026
1 changed files with 16 additions and 11 deletions

View File

@ -698,7 +698,7 @@ namespace OpenSim
} }
InventoryFolderImpl inventoryFolder = null; InventoryFolderImpl inventoryFolder = null;
//InventoryItemBase inventoryItem = null; InventoryItemBase inventoryItem = null;
if (userInfo.HasReceivedInventory) if (userInfo.HasReceivedInventory)
{ {
@ -725,10 +725,11 @@ namespace OpenSim
inventoryFolder = userInfo.RootFolder.FindFolderByPath(invPath); 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 else
{ {
@ -736,15 +737,19 @@ namespace OpenSim
return; return;
} }
if (null == inventoryFolder) if (null != inventoryFolder)
{
m_log.ErrorFormat("[CONSOLE]: Could not find folder with path {0}", invPath);
return;
}
else
{ {
m_log.InfoFormat("[CONSOLE]: Found folder {0} {1} at {2}", inventoryFolder.Name, inventoryFolder.ID, invPath); m_log.InfoFormat("[CONSOLE]: Found folder {0} {1} at {2}", inventoryFolder.Name, inventoryFolder.ID, invPath);
} }
else if (null != inventoryItem)
{
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;
}
} }
/// <summary> /// <summary>