diff options
-rw-r--r-- | OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimInventoryFrontendPlugin.cs | 11 | ||||
-rw-r--r-- | OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimInventoryService.cs | 2 |
2 files changed, 9 insertions, 4 deletions
diff --git a/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimInventoryFrontendPlugin.cs b/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimInventoryFrontendPlugin.cs index 838bc3a..705a3ef 100644 --- a/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimInventoryFrontendPlugin.cs +++ b/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimInventoryFrontendPlugin.cs | |||
@@ -227,14 +227,19 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim | |||
227 | { | 227 | { |
228 | Uri owner = Utils.GetOpenSimUri(folder.Owner); | 228 | Uri owner = Utils.GetOpenSimUri(folder.Owner); |
229 | 229 | ||
230 | // Some calls that are moving or updating a folder instead of creating a new one | 230 | // Some calls that are moving or updating a folder instead |
231 | // will pass in an InventoryFolder without the name set. If this is the case we | 231 | // of creating a new one will pass in an InventoryFolder |
232 | // need to look up the name first | 232 | // without the name set and type set to 0. If this is the |
233 | // case we need to look up the name first and preserver | ||
234 | // it's type. | ||
233 | if (String.IsNullOrEmpty(folder.Name)) | 235 | if (String.IsNullOrEmpty(folder.Name)) |
234 | { | 236 | { |
235 | InventoryFolderWithChildren oldFolder; | 237 | InventoryFolderWithChildren oldFolder; |
236 | if (m_server.InventoryProvider.TryFetchFolder(owner, folder.ID, out oldFolder) == BackendResponse.Success) | 238 | if (m_server.InventoryProvider.TryFetchFolder(owner, folder.ID, out oldFolder) == BackendResponse.Success) |
239 | { | ||
237 | folder.Name = oldFolder.Name; | 240 | folder.Name = oldFolder.Name; |
241 | folder.Type = oldFolder.Type; | ||
242 | } | ||
238 | } | 243 | } |
239 | 244 | ||
240 | BackendResponse storageResponse = m_server.InventoryProvider.TryCreateFolder(owner, folder); | 245 | BackendResponse storageResponse = m_server.InventoryProvider.TryCreateFolder(owner, folder); |
diff --git a/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimInventoryService.cs b/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimInventoryService.cs index ca995b3..3ddd07d 100644 --- a/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimInventoryService.cs +++ b/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimInventoryService.cs | |||
@@ -48,7 +48,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim | |||
48 | 48 | ||
49 | if (null != baseFolder) | 49 | if (null != baseFolder) |
50 | { | 50 | { |
51 | folder = (InventoryFolderWithChildren) baseFolder; | 51 | folder = new InventoryFolderWithChildren(baseFolder); |
52 | folder.Children = null; // This call only returns data for the folder itself, no children data | 52 | folder.Children = null; // This call only returns data for the folder itself, no children data |
53 | } | 53 | } |
54 | 54 | ||