diff options
Diffstat (limited to 'OpenSim/Framework/Data.SQLite')
-rw-r--r-- | OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs b/OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs index 5e95878..94084a6 100644 --- a/OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs +++ b/OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs | |||
@@ -226,11 +226,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
226 | return new List<InventoryFolderBase>(); | 226 | return new List<InventoryFolderBase>(); |
227 | } | 227 | } |
228 | 228 | ||
229 | /// <summary> | 229 | // see InventoryItemBase.getUserRootFolder |
230 | /// Returns the users inventory root folder. | ||
231 | /// </summary> | ||
232 | /// <param name="user">The UUID of the user who is having inventory being returned</param> | ||
233 | /// <returns>Root inventory folder</returns> | ||
234 | public InventoryFolderBase getUserRootFolder(LLUUID user) | 230 | public InventoryFolderBase getUserRootFolder(LLUUID user) |
235 | { | 231 | { |
236 | List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); | 232 | List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); |
@@ -242,22 +238,15 @@ namespace OpenSim.Framework.Data.SQLite | |||
242 | folders.Add(buildFolder(row)); | 238 | folders.Add(buildFolder(row)); |
243 | } | 239 | } |
244 | 240 | ||
245 | if (folders.Count == 1) | 241 | // There should only ever be one root folder for a user. However, if there's more |
242 | // than one we'll simply use the first one rather than failing. It would be even | ||
243 | // nicer to print some message to this effect, but this feels like it's too low a | ||
244 | // to put such a message out, and it's too minor right now to spare the time to | ||
245 | // suitably refactor. | ||
246 | if (folders.Count > 1) | ||
246 | { | 247 | { |
247 | //we found the root | ||
248 | //System.Console.WriteLine("found root inventory folder"); | ||
249 | return folders[0]; | 248 | return folders[0]; |
250 | } | 249 | } |
251 | else if (folders.Count > 1) | ||
252 | { | ||
253 | //err shouldn't be more than one root | ||
254 | //System.Console.WriteLine("found more than one root inventory folder"); | ||
255 | } | ||
256 | else if (folders.Count == 0) | ||
257 | { | ||
258 | // no root? | ||
259 | //System.Console.WriteLine("couldn't find root inventory folder"); | ||
260 | } | ||
261 | 250 | ||
262 | return null; | 251 | return null; |
263 | } | 252 | } |
@@ -608,4 +597,4 @@ namespace OpenSim.Framework.Data.SQLite | |||
608 | return true; | 597 | return true; |
609 | } | 598 | } |
610 | } | 599 | } |
611 | } \ No newline at end of file | 600 | } |