aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
authorDiva Canto2010-09-02 16:36:43 -0700
committerDiva Canto2010-09-02 16:36:43 -0700
commit21c5377af998bdd2c6a442588195a7af4d21fa48 (patch)
tree149e6d3dbeb5b3061bd5625763dfb388a50ed47b /OpenSim/Services
parentQuick fix for making global references for gatekeepers that are not domain:po... (diff)
parentRemove commented code and the comment, as the change has proven out (diff)
downloadopensim-SC-21c5377af998bdd2c6a442588195a7af4d21fa48.zip
opensim-SC-21c5377af998bdd2c6a442588195a7af4d21fa48.tar.gz
opensim-SC-21c5377af998bdd2c6a442588195a7af4d21fa48.tar.bz2
opensim-SC-21c5377af998bdd2c6a442588195a7af4d21fa48.tar.xz
Merge branch 'master' of ssh://diva@opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Services')
-rw-r--r--OpenSim/Services/InventoryService/XInventoryService.cs24
1 files changed, 23 insertions, 1 deletions
diff --git a/OpenSim/Services/InventoryService/XInventoryService.cs b/OpenSim/Services/InventoryService/XInventoryService.cs
index 84306e7..fb395ec 100644
--- a/OpenSim/Services/InventoryService/XInventoryService.cs
+++ b/OpenSim/Services/InventoryService/XInventoryService.cs
@@ -293,13 +293,35 @@ namespace OpenSim.Services.InventoryService
293 293
294 public virtual bool AddFolder(InventoryFolderBase folder) 294 public virtual bool AddFolder(InventoryFolderBase folder)
295 { 295 {
296 InventoryFolderBase check = GetFolder(folder);
297 if (check != null)
298 return false;
299
296 XInventoryFolder xFolder = ConvertFromOpenSim(folder); 300 XInventoryFolder xFolder = ConvertFromOpenSim(folder);
297 return m_Database.StoreFolder(xFolder); 301 return m_Database.StoreFolder(xFolder);
298 } 302 }
299 303
300 public virtual bool UpdateFolder(InventoryFolderBase folder) 304 public virtual bool UpdateFolder(InventoryFolderBase folder)
301 { 305 {
302 return AddFolder(folder); 306 XInventoryFolder xFolder = ConvertFromOpenSim(folder);
307 InventoryFolderBase check = GetFolder(folder);
308 if (check == null)
309 return AddFolder(folder);
310
311 if (check.Type != -1 || xFolder.type != -1)
312 {
313 if (xFolder.version > check.Version)
314 return false;
315 check.Version = (ushort)xFolder.version;
316 xFolder = ConvertFromOpenSim(check);
317 return m_Database.StoreFolder(xFolder);
318 }
319
320 if (xFolder.version < check.Version)
321 xFolder.version = check.Version;
322 xFolder.folderID = check.ID;
323
324 return m_Database.StoreFolder(xFolder);
303 } 325 }
304 326
305 public virtual bool MoveFolder(InventoryFolderBase folder) 327 public virtual bool MoveFolder(InventoryFolderBase folder)