Browse Source

HG Suitcase Inventory: if RootFolder type doesn't work, look for any folder with parentID=UUID.Zero

Diva Canto 11 years ago
parent
commit
783443705d
1 changed files with 9 additions and 0 deletions
  1. 9 0
      OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs

+ 9 - 0
OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs

@@ -460,6 +460,15 @@ namespace OpenSim.Services.HypergridService
 
             if (folders != null && folders.Length > 0)
                 return folders[0];
+
+            // OK, so the RootFolder type didn't work. Let's look for any type with parent UUID.Zero.
+            folders = m_Database.GetFolders(
+                new string[] { "agentID", "folderName", "parentFolderID" },
+                new string[] { principalID.ToString(), "My Inventory", UUID.Zero.ToString() });
+
+            if (folders != null && folders.Length > 0)
+                return folders[0];
+
             return null;
         }