aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-06-29 01:33:41 +0100
committerJustin Clark-Casey (justincc)2011-06-29 01:33:41 +0100
commitc84a1bd99f5f37e371135d7c3a7121841c778864 (patch)
treed8f4dc13de2ebf4c52a780ea5363c3dcb28b19b4 /OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
parentrefactor: simplify redundant double containing folder check (diff)
downloadopensim-SC_OLD-c84a1bd99f5f37e371135d7c3a7121841c778864.zip
opensim-SC_OLD-c84a1bd99f5f37e371135d7c3a7121841c778864.tar.gz
opensim-SC_OLD-c84a1bd99f5f37e371135d7c3a7121841c778864.tar.bz2
opensim-SC_OLD-c84a1bd99f5f37e371135d7c3a7121841c778864.tar.xz
Don't follow inventory links of links.
This is to avoid problems with corrupt inventories where an inventory link target points back at the source's folder No viewer has been observed to set these up as of yet. If this ever happens, we will need a more sophisticated solution to track sent folders within the recursion
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 07507b2..13085e3 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -1340,7 +1340,10 @@ namespace OpenSim.Region.Framework.Scenes
1340 InventoryItemBase linkedItem = InventoryService.GetItem(new InventoryItemBase(item.AssetID)); 1340 InventoryItemBase linkedItem = InventoryService.GetItem(new InventoryItemBase(item.AssetID));
1341 1341
1342 // Take care of genuinely broken links where the target doesn't exist 1342 // Take care of genuinely broken links where the target doesn't exist
1343 if (linkedItem != null) 1343 // HACK: Also, don't follow up links that just point to other links. In theory this is legitimate,
1344 // but no viewer has been observed to set these up and this is the lazy way of avoiding cycles
1345 // rather than having to keep track of every folder requested in the recursion.
1346 if (linkedItem != null && linkedItem.AssetType != (int)AssetType.Link)
1344 { 1347 {
1345 // We don't need to send the folder if source and destination of the link are in the same 1348 // We don't need to send the folder if source and destination of the link are in the same
1346 // folder. 1349 // folder.