FIRE-21719: Copy-pasting a folder doesn't copy contained links

meow-7.2.2
Ansariel 2018-01-11 15:00:25 +01:00
parent 59fa77d2d9
commit 2063045b1e
1 changed files with 10 additions and 1 deletions

View File

@ -434,7 +434,10 @@ void copy_inventory_category(LLInventoryModel* model,
LLInventoryItem* item = *iter;
LLPointer<LLInventoryCallback> cb = new LLBoostFuncInventoryCallback(boost::bind(update_folder_cb, new_cat_uuid));
if (!item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID(), gAgent.getGroupID()))
// <FS:Ansariel> 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()))
// </FS:Ansariel>
{
// 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);
}
// <FS:Ansariel> FIRE-21719: Copy-pasting a folder doesn't copy contained links
else if (item->getIsLinkType())
{
link_inventory_object(new_cat_uuid, item->getLinkedUUID(), cb);
}
// </FS:Ansariel>
else
{
copy_inventory_item(