aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authormorphw2007-05-11 19:24:09 +0000
committermorphw2007-05-11 19:24:09 +0000
commitb865249b8ceea6c72f467f35304c9c0eabd65240 (patch)
tree1e2c3135951dec9e7055c728c0318ceb5246d3fe
parentfinally some time to do some more work on the primitive2 refactor/rewrite/bug... (diff)
downloadopensim-SC_OLD-b865249b8ceea6c72f467f35304c9c0eabd65240.zip
opensim-SC_OLD-b865249b8ceea6c72f467f35304c9c0eabd65240.tar.gz
opensim-SC_OLD-b865249b8ceea6c72f467f35304c9c0eabd65240.tar.bz2
opensim-SC_OLD-b865249b8ceea6c72f467f35304c9c0eabd65240.tar.xz
Guard against re-adding an existing folder. Seemed to happen on some timeout cases.
Diffstat (limited to '')
-rw-r--r--OpenSim.Framework/AgentInventory.cs19
1 files changed, 11 insertions, 8 deletions
diff --git a/OpenSim.Framework/AgentInventory.cs b/OpenSim.Framework/AgentInventory.cs
index 35c27d9..57ee7d9 100644
--- a/OpenSim.Framework/AgentInventory.cs
+++ b/OpenSim.Framework/AgentInventory.cs
@@ -77,14 +77,17 @@ namespace OpenSim.Framework.Inventory
77 77
78 public bool CreateNewFolder(LLUUID folderID, ushort type, string folderName, LLUUID parent) 78 public bool CreateNewFolder(LLUUID folderID, ushort type, string folderName, LLUUID parent)
79 { 79 {
80 Console.WriteLine("creating new folder called " + folderName + " in agents inventory"); 80 if (!this.InventoryFolders.ContainsKey(folderID))
81 InventoryFolder Folder = new InventoryFolder(); 81 {
82 Folder.FolderID = folderID; 82 Console.WriteLine("creating new folder called " + folderName + " in agents inventory");
83 Folder.OwnerID = this.AgentID; 83 InventoryFolder Folder = new InventoryFolder();
84 Folder.DefaultType = type; 84 Folder.FolderID = folderID;
85 Folder.FolderName = folderName; 85 Folder.OwnerID = this.AgentID;
86 Folder.ParentID = parent; 86 Folder.DefaultType = type;
87 this.InventoryFolders.Add(Folder.FolderID, Folder); 87 Folder.FolderName = folderName;
88 Folder.ParentID = parent;
89 this.InventoryFolders.Add(Folder.FolderID, Folder);
90 }
88 91
89 return (true); 92 return (true);
90 } 93 }