From d95d3b949bc5c8a9425ea096fb721a9cc0111e67 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 18 Aug 2009 07:05:22 -0700 Subject: Fixes mantis #4020 (http://opensimulator.org/mantis/view.php?id=4020) --- .../Framework/Scenes/Scene.PacketHandlers.cs | 26 ++++++++++------------ 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index 2bf4ea8..fde922f 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs @@ -517,21 +517,19 @@ 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) - { - 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)) + InventoryFolderBase folder = new InventoryFolderBase(folderID); + folder = InventoryService.GetFolder(folder); + if (folder != null) { - m_log.ErrorFormat( - "[AGENT INVENTORY]: Failed to update folder for user {0} {1}", - remoteClient.Name, remoteClient.AgentId); + 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); + } } } -- cgit v1.1