aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Cache/InventoryFolder.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Communications/Cache/InventoryFolder.cs')
-rw-r--r--OpenSim/Framework/Communications/Cache/InventoryFolder.cs12
1 files changed, 10 insertions, 2 deletions
diff --git a/OpenSim/Framework/Communications/Cache/InventoryFolder.cs b/OpenSim/Framework/Communications/Cache/InventoryFolder.cs
index 885cffc..a212614 100644
--- a/OpenSim/Framework/Communications/Cache/InventoryFolder.cs
+++ b/OpenSim/Framework/Communications/Cache/InventoryFolder.cs
@@ -35,6 +35,9 @@ using OpenSim.Framework.Interfaces;
35using OpenSim.Framework.Data; 35using OpenSim.Framework.Data;
36using OpenSim.Framework.Types; 36using OpenSim.Framework.Types;
37using OpenSim.Framework.Utilities; 37using OpenSim.Framework.Utilities;
38using OpenSim.Framework.Console;
39
40using InventoryCategory = OpenSim.Framework.Data.InventoryCategory;
38 41
39namespace OpenSim.Framework.Communications.Caches 42namespace OpenSim.Framework.Communications.Caches
40{ 43{
@@ -60,7 +63,7 @@ namespace OpenSim.Framework.Communications.Caches
60 } 63 }
61 64
62 // Methods 65 // Methods
63 public InventoryFolder CreateNewSubFolder(LLUUID folderID, string folderName, ushort type) 66 public InventoryFolder CreateNewSubFolder(LLUUID folderID, string folderName, ushort type, InventoryCategory category)
64 { 67 {
65 InventoryFolder subFold = new InventoryFolder(); 68 InventoryFolder subFold = new InventoryFolder();
66 subFold.name = folderName; 69 subFold.name = folderName;
@@ -68,7 +71,12 @@ namespace OpenSim.Framework.Communications.Caches
68 subFold.type = (short) type; 71 subFold.type = (short) type;
69 subFold.parentID = this.folderID; 72 subFold.parentID = this.folderID;
70 subFold.agentID = this.agentID; 73 subFold.agentID = this.agentID;
71 this.SubFolders.Add(subFold.folderID, subFold); 74 subFold.category = category;
75 if (!SubFolders.ContainsKey(subFold.folderID))
76 this.SubFolders.Add(subFold.folderID, subFold);
77 else
78 MainLog.Instance.Warn("INVENTORYCACHE", "Attempt to create a duplicate folder {0} {1}", folderName, folderID);
79
72 return subFold; 80 return subFold;
73 } 81 }
74 82