aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs26
1 files changed, 12 insertions, 14 deletions
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
517// m_log.DebugFormat( 517// m_log.DebugFormat(
518// "[AGENT INVENTORY]: Updating inventory folder {0} {1} for {2} {3}", folderID, name, remoteClient.Name, remoteClient.AgentId); 518// "[AGENT INVENTORY]: Updating inventory folder {0} {1} for {2} {3}", folderID, name, remoteClient.Name, remoteClient.AgentId);
519 519
520 CachedUserInfo userProfile = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); 520 InventoryFolderBase folder = new InventoryFolderBase(folderID);
521 521 folder = InventoryService.GetFolder(folder);
522 if (null == userProfile) 522 if (folder != null)
523 {
524 m_log.ErrorFormat(
525 "[AGENT INVENTORY]: Could not find user profile for {0} {1}",
526 remoteClient.Name, remoteClient.AgentId);
527 return;
528 }
529
530 if (!userProfile.UpdateFolder(name, folderID, type, parentID))
531 { 523 {
532 m_log.ErrorFormat( 524 folder.Name = name;
533 "[AGENT INVENTORY]: Failed to update folder for user {0} {1}", 525 folder.Type = (short)type;
534 remoteClient.Name, remoteClient.AgentId); 526 folder.ParentID = parentID;
527 if (!InventoryService.UpdateFolder(folder))
528 {
529 m_log.ErrorFormat(
530 "[AGENT INVENTORY]: Failed to update folder for user {0} {1}",
531 remoteClient.Name, remoteClient.AgentId);
532 }
535 } 533 }
536 } 534 }
537 535