Guard against re-adding an existing folder. Seemed to happen on some timeout cases.

zircon^2
morphw 2007-05-11 19:24:09 +00:00
parent f016e8675b
commit b865249b8c
1 changed files with 11 additions and 8 deletions

View File

@ -76,6 +76,8 @@ namespace OpenSim.Framework.Inventory
}
public bool CreateNewFolder(LLUUID folderID, ushort type, string folderName, LLUUID parent)
{
if (!this.InventoryFolders.ContainsKey(folderID))
{
Console.WriteLine("creating new folder called " + folderName + " in agents inventory");
InventoryFolder Folder = new InventoryFolder();
@ -85,6 +87,7 @@ namespace OpenSim.Framework.Inventory
Folder.FolderName = folderName;
Folder.ParentID = parent;
this.InventoryFolders.Add(Folder.FolderID, Folder);
}
return (true);
}