aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-05-21 19:38:43 +0100
committerJustin Clark-Casey (justincc)2012-05-21 19:38:43 +0100
commit16d303f7cd631d05cba24c95546da0f7d0d6c774 (patch)
treec05c19a02ec02e1fd76db0b7cc9a12b79f03cca4 /OpenSim/Services
parentImprove locking of RegionCombinerModule.m_regions (diff)
downloadopensim-SC-16d303f7cd631d05cba24c95546da0f7d0d6c774.zip
opensim-SC-16d303f7cd631d05cba24c95546da0f7d0d6c774.tar.gz
opensim-SC-16d303f7cd631d05cba24c95546da0f7d0d6c774.tar.bz2
opensim-SC-16d303f7cd631d05cba24c95546da0f7d0d6c774.tar.xz
Fix bug where outfit folders could not be renamed.
Outfit folders are a type of system folder whose details are allowed to change.
Diffstat (limited to 'OpenSim/Services')
-rw-r--r--OpenSim/Services/InventoryService/XInventoryService.cs17
1 files changed, 13 insertions, 4 deletions
diff --git a/OpenSim/Services/InventoryService/XInventoryService.cs b/OpenSim/Services/InventoryService/XInventoryService.cs
index eed88bd..2ce1bab 100644
--- a/OpenSim/Services/InventoryService/XInventoryService.cs
+++ b/OpenSim/Services/InventoryService/XInventoryService.cs
@@ -327,27 +327,36 @@ namespace OpenSim.Services.InventoryService
327 327
328 public virtual bool UpdateFolder(InventoryFolderBase folder) 328 public virtual bool UpdateFolder(InventoryFolderBase folder)
329 { 329 {
330 //m_log.DebugFormat("[XINVENTORY]: Update folder {0} {1} ({2})", folder.Name, folder.Type, folder.ID); 330// m_log.DebugFormat("[XINVENTORY]: Update folder {0} {1} ({2})", folder.Name, folder.Type, folder.ID);
331
331 XInventoryFolder xFolder = ConvertFromOpenSim(folder); 332 XInventoryFolder xFolder = ConvertFromOpenSim(folder);
332 InventoryFolderBase check = GetFolder(folder); 333 InventoryFolderBase check = GetFolder(folder);
334
333 if (check == null) 335 if (check == null)
334 return AddFolder(folder); 336 return AddFolder(folder);
335 337
336 if (check.Type != -1 || xFolder.type != -1) 338 if ((check.Type != (short)AssetType.Unknown || xFolder.type != (short)AssetType.Unknown)
339 && (check.Type != (short)AssetType.OutfitFolder || xFolder.type != (short)AssetType.OutfitFolder))
337 { 340 {
338 if (xFolder.version < check.Version) 341 if (xFolder.version < check.Version)
339 { 342 {
340 //m_log.DebugFormat("[XINVENTORY]: {0} < {1} can't do", xFolder.version, check.Version); 343// m_log.DebugFormat("[XINVENTORY]: {0} < {1} can't do", xFolder.version, check.Version);
341 return false; 344 return false;
342 } 345 }
346
343 check.Version = (ushort)xFolder.version; 347 check.Version = (ushort)xFolder.version;
344 xFolder = ConvertFromOpenSim(check); 348 xFolder = ConvertFromOpenSim(check);
345 //m_log.DebugFormat("[XINVENTORY]: Storing {0} {1} {2}", xFolder.folderName, xFolder.version, xFolder.type); 349
350// m_log.DebugFormat(
351// "[XINVENTORY]: Storing version only update to system folder {0} {1} {2}",
352// xFolder.folderName, xFolder.version, xFolder.type);
353
346 return m_Database.StoreFolder(xFolder); 354 return m_Database.StoreFolder(xFolder);
347 } 355 }
348 356
349 if (xFolder.version < check.Version) 357 if (xFolder.version < check.Version)
350 xFolder.version = check.Version; 358 xFolder.version = check.Version;
359
351 xFolder.folderID = check.ID; 360 xFolder.folderID = check.ID;
352 361
353 return m_Database.StoreFolder(xFolder); 362 return m_Database.StoreFolder(xFolder);