From 2063045b1e9b51446ec540f2bb7e2f0700ea8a22 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Thu, 11 Jan 2018 15:00:25 +0100 Subject: [PATCH] FIRE-21719: Copy-pasting a folder doesn't copy contained links --- indra/newview/llinventoryfunctions.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index c0d305c281..ff9b68d947 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -434,7 +434,10 @@ void copy_inventory_category(LLInventoryModel* model, LLInventoryItem* item = *iter; LLPointer cb = new LLBoostFuncInventoryCallback(boost::bind(update_folder_cb, new_cat_uuid)); - if (!item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID(), gAgent.getGroupID())) + // FIRE-21719: Copy-pasting a folder doesn't copy contained links + //if (!item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID(), gAgent.getGroupID())) + if (!item->getIsLinkType() && !item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID(), gAgent.getGroupID())) + // { // If the item is nocopy, we do nothing or, optionally, move it if (move_no_copy_items) @@ -446,6 +449,12 @@ void copy_inventory_category(LLInventoryModel* model, // Decrement the count in root_id since that one item won't be copied over LLMarketplaceData::instance().decrementValidationWaiting(root_id); } + // FIRE-21719: Copy-pasting a folder doesn't copy contained links + else if (item->getIsLinkType()) + { + link_inventory_object(new_cat_uuid, item->getLinkedUUID(), cb); + } + // else { copy_inventory_item(