diff options
author | Melanie | 2009-09-10 00:33:00 +0100 |
---|---|---|
committer | Melanie | 2009-09-10 00:33:00 +0100 |
commit | 0034dd043fb1e997f5b9ef12c42ab36e3c984765 (patch) | |
tree | 4a7a8e1a9bed00dd29c5341ce373992f0c2af339 /OpenSim/Framework/Capabilities | |
parent | Merge branch 'master' of ssh://MyConnection/var/git/opensim (diff) | |
download | opensim-SC_OLD-0034dd043fb1e997f5b9ef12c42ab36e3c984765.zip opensim-SC_OLD-0034dd043fb1e997f5b9ef12c42ab36e3c984765.tar.gz opensim-SC_OLD-0034dd043fb1e997f5b9ef12c42ab36e3c984765.tar.bz2 opensim-SC_OLD-0034dd043fb1e997f5b9ef12c42ab36e3c984765.tar.xz |
Many databases contain folders with invalid folder ID. Folder IDs are
supposed to be within -1 .. 22 and other values break inventory loading.
This patch fixes it and allows inventory to load. Invalid folder types
will be treated as ordinary folders.
Diffstat (limited to 'OpenSim/Framework/Capabilities')
-rw-r--r-- | OpenSim/Framework/Capabilities/Caps.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/OpenSim/Framework/Capabilities/Caps.cs b/OpenSim/Framework/Capabilities/Caps.cs index 665bfe5..1dfb2d4 100644 --- a/OpenSim/Framework/Capabilities/Caps.cs +++ b/OpenSim/Framework/Capabilities/Caps.cs | |||
@@ -502,7 +502,7 @@ namespace OpenSim.Framework.Capabilities | |||
502 | llsdFolder.folder_id = invFolder.ID; | 502 | llsdFolder.folder_id = invFolder.ID; |
503 | llsdFolder.parent_id = invFolder.ParentID; | 503 | llsdFolder.parent_id = invFolder.ParentID; |
504 | llsdFolder.name = invFolder.Name; | 504 | llsdFolder.name = invFolder.Name; |
505 | if (invFolder.Type == -1) | 505 | if (invFolder.Type < 0 || invFolder.Type >= TaskInventoryItem.Types.Length) |
506 | llsdFolder.type = "-1"; | 506 | llsdFolder.type = "-1"; |
507 | else | 507 | else |
508 | llsdFolder.type = TaskInventoryItem.Types[invFolder.Type]; | 508 | llsdFolder.type = TaskInventoryItem.Types[invFolder.Type]; |