aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Services/InventoryService/XInventoryService.cs11
1 files changed, 10 insertions, 1 deletions
diff --git a/OpenSim/Services/InventoryService/XInventoryService.cs b/OpenSim/Services/InventoryService/XInventoryService.cs
index 00faa44..7bad4b0 100644
--- a/OpenSim/Services/InventoryService/XInventoryService.cs
+++ b/OpenSim/Services/InventoryService/XInventoryService.cs
@@ -219,9 +219,15 @@ namespace OpenSim.Services.InventoryService
219 219
220 XInventoryFolder root = null; 220 XInventoryFolder root = null;
221 foreach (XInventoryFolder folder in folders) 221 foreach (XInventoryFolder folder in folders)
222 {
222 if (folder.folderName == "My Inventory") 223 if (folder.folderName == "My Inventory")
224 {
223 root = folder; 225 root = folder;
224 if (folders == null) // oops 226 break;
227 }
228 }
229
230 if (root == null) // oops
225 root = folders[0]; 231 root = folders[0];
226 232
227 return ConvertToOpenSim(root); 233 return ConvertToOpenSim(root);
@@ -249,6 +255,9 @@ namespace OpenSim.Services.InventoryService
249 { 255 {
250// m_log.DebugFormat("[XINVENTORY SERVICE]: Getting folder type {0} for user {1}", type, principalID); 256// m_log.DebugFormat("[XINVENTORY SERVICE]: Getting folder type {0} for user {1}", type, principalID);
251 257
258 if (type == AssetType.RootFolder)
259 return rootFolder;
260
252 XInventoryFolder[] folders = m_Database.GetFolders( 261 XInventoryFolder[] folders = m_Database.GetFolders(
253 new string[] { "agentID", "parentFolderID", "type"}, 262 new string[] { "agentID", "parentFolderID", "type"},
254 new string[] { rootFolder.Owner.ToString(), rootFolder.ID.ToString(), ((int)type).ToString() }); 263 new string[] { rootFolder.Owner.ToString(), rootFolder.ID.ToString(), ((int)type).ToString() });