diff options
Diffstat (limited to 'OpenSim/Framework/Data.MSSQL')
-rw-r--r-- | OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs b/OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs index 364e0f2..cd0470c 100644 --- a/OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs +++ b/OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs | |||
@@ -201,11 +201,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
201 | } | 201 | } |
202 | } | 202 | } |
203 | 203 | ||
204 | /// <summary> | 204 | // see InventoryItemBase.getUserRootFolder |
205 | /// Returns the users inventory root folder. | ||
206 | /// </summary> | ||
207 | /// <param name="user"></param> | ||
208 | /// <returns></returns> | ||
209 | public InventoryFolderBase getUserRootFolder(LLUUID user) | 205 | public InventoryFolderBase getUserRootFolder(LLUUID user) |
210 | { | 206 | { |
211 | try | 207 | try |
@@ -224,8 +220,14 @@ namespace OpenSim.Framework.Data.MSSQL | |||
224 | items.Add(readInventoryFolder(reader)); | 220 | items.Add(readInventoryFolder(reader)); |
225 | 221 | ||
226 | InventoryFolderBase rootFolder = null; | 222 | InventoryFolderBase rootFolder = null; |
223 | |||
224 | // There should only ever be one root folder for a user. However, if there's more | ||
225 | // than one we'll simply use the first one rather than failing. It would be even | ||
226 | // nicer to print some message to this effect, but this feels like it's too low a | ||
227 | // to put such a message out, and it's too minor right now to spare the time to | ||
228 | // suitably refactor. | ||
227 | if (items.Count > 0) { | 229 | if (items.Count > 0) { |
228 | rootFolder = items[0]; //should only be one folder with parent set to zero (the root one). | 230 | rootFolder = items[0]; |
229 | } | 231 | } |
230 | 232 | ||
231 | reader.Close(); | 233 | reader.Close(); |
@@ -694,4 +696,4 @@ namespace OpenSim.Framework.Data.MSSQL | |||
694 | } | 696 | } |
695 | } | 697 | } |
696 | } | 698 | } |
697 | } \ No newline at end of file | 699 | } |