Diva Canto 2009-08-18 07:05:22 -07:00
parent cd3b7bcb03
commit d95d3b949b
1 changed files with 12 additions and 14 deletions

View File

@ -517,23 +517,21 @@ namespace OpenSim.Region.Framework.Scenes
// m_log.DebugFormat(
// "[AGENT INVENTORY]: Updating inventory folder {0} {1} for {2} {3}", folderID, name, remoteClient.Name, remoteClient.AgentId);
CachedUserInfo userProfile = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
if (null == userProfile)
InventoryFolderBase folder = new InventoryFolderBase(folderID);
folder = InventoryService.GetFolder(folder);
if (folder != null)
{
m_log.ErrorFormat(
"[AGENT INVENTORY]: Could not find user profile for {0} {1}",
remoteClient.Name, remoteClient.AgentId);
return;
}
if (!userProfile.UpdateFolder(name, folderID, type, parentID))
folder.Name = name;
folder.Type = (short)type;
folder.ParentID = parentID;
if (!InventoryService.UpdateFolder(folder))
{
m_log.ErrorFormat(
"[AGENT INVENTORY]: Failed to update folder for user {0} {1}",
remoteClient.Name, remoteClient.AgentId);
}
}
}
public void HandleMoveInventoryFolder(IClientAPI remoteClient, UUID folderID, UUID parentID)
{