From 4dee53c7fb476b0503b8443b2dba1eb868a56815 Mon Sep 17 00:00:00 2001 From: MW Date: Sat, 1 Dec 2007 20:57:14 +0000 Subject: Attempt to fix mantis issue # 73 --- .../Communications/Cache/InventoryFolder.cs | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/OpenSim/Framework/Communications/Cache/InventoryFolder.cs b/OpenSim/Framework/Communications/Cache/InventoryFolder.cs index 6161c5a..fd029cd 100644 --- a/OpenSim/Framework/Communications/Cache/InventoryFolder.cs +++ b/OpenSim/Framework/Communications/Cache/InventoryFolder.cs @@ -60,14 +60,18 @@ namespace OpenSim.Framework.Communications.Cache // Methods public InventoryFolderImpl CreateNewSubFolder(LLUUID folderID, string folderName, ushort type) { - InventoryFolderImpl subFold = new InventoryFolderImpl(); - subFold.name = folderName; - subFold.folderID = folderID; - subFold.type = (short) type; - subFold.parentID = this.folderID; - subFold.agentID = agentID; - SubFolders.Add(subFold.folderID, subFold); - return subFold; + if (!SubFolders.ContainsKey(folderID)) + { + InventoryFolderImpl subFold = new InventoryFolderImpl(); + subFold.name = folderName; + subFold.folderID = folderID; + subFold.type = (short)type; + subFold.parentID = this.folderID; + subFold.agentID = agentID; + SubFolders.Add(subFold.folderID, subFold); + return subFold; + } + return null; } public InventoryItemBase HasItem(LLUUID itemID) -- cgit v1.1