diff options
author | Justin Clarke Casey | 2008-12-09 18:35:09 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-12-09 18:35:09 +0000 |
commit | 762712c02e4abf332d2d9a0ba583d6fe6f406aff (patch) | |
tree | 673471a2715e6a73dc051dbbd5b8dbed57cde8c2 /OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs | |
parent | * Apply terrain flip patch from http://opensimulator.org/mantis/view.php?id=2315 (diff) | |
download | opensim-SC-762712c02e4abf332d2d9a0ba583d6fe6f406aff.zip opensim-SC-762712c02e4abf332d2d9a0ba583d6fe6f406aff.tar.gz opensim-SC-762712c02e4abf332d2d9a0ba583d6fe6f406aff.tar.bz2 opensim-SC-762712c02e4abf332d2d9a0ba583d6fe6f406aff.tar.xz |
* Actually update subfolders of parent folders in the inventory cache when a folder gets moved
* This was causing inventory folder transfer code to not work properly (this is still temporarily disabled)
Diffstat (limited to 'OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs')
-rw-r--r-- | OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs b/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs index 0704232..83ac239 100644 --- a/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs +++ b/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs | |||
@@ -92,6 +92,42 @@ namespace OpenSim.Framework.Communications.Cache | |||
92 | 92 | ||
93 | return null; | 93 | return null; |
94 | } | 94 | } |
95 | |||
96 | /// <summary> | ||
97 | /// Add a folder that already exists. | ||
98 | /// </summary> | ||
99 | /// <param name="folder"></param> | ||
100 | public void AddChildFolder(InventoryFolderImpl folder) | ||
101 | { | ||
102 | lock (SubFolders) | ||
103 | { | ||
104 | folder.ParentID = ID; | ||
105 | SubFolders[folder.ID] = folder; | ||
106 | } | ||
107 | } | ||
108 | |||
109 | /// <summary> | ||
110 | /// Removes the given child subfolder. | ||
111 | /// </summary> | ||
112 | /// <param name="folderID"></param> | ||
113 | /// <returns> | ||
114 | /// The folder removed, or null if the folder was not present. | ||
115 | /// </returns> | ||
116 | public InventoryFolderImpl RemoveChildFolder(UUID folderID) | ||
117 | { | ||
118 | InventoryFolderImpl removedFolder = null; | ||
119 | |||
120 | lock (SubFolders) | ||
121 | { | ||
122 | if (SubFolders.ContainsKey(folderID)) | ||
123 | { | ||
124 | removedFolder = SubFolders[folderID]; | ||
125 | SubFolders.Remove(folderID); | ||
126 | } | ||
127 | } | ||
128 | |||
129 | return removedFolder; | ||
130 | } | ||
95 | 131 | ||
96 | /// <summary> | 132 | /// <summary> |
97 | /// Delete all the folders and items in this folder. | 133 | /// Delete all the folders and items in this folder. |