From 007939f0a76fd2f596d4d4252578af3d30234b33 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Wed, 11 Jan 2023 07:44:12 +0200
Subject: [PATCH] SL-18939 Cannot copy inventory folders with copiable links

---
 indra/newview/llinventorybridge.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 7793b71f565..7a3b913ed57 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -2140,6 +2140,7 @@ bool LLItemBridge::isItemCopyable(bool can_copy_as_link) const
 
     static LLCachedControl<bool> inventory_linking(gSavedSettings, "InventoryLinking", true);
     return (can_copy_as_link && inventory_linking)
+        || (mIsLink && inventory_linking)
         || item->getPermissions().allowCopyBy(gAgent.getID());
 }
 
@@ -2346,6 +2347,12 @@ BOOL LLFolderBridge::isUpToDate() const
 
 bool LLFolderBridge::isItemCopyable(bool can_copy_as_link) const
 {
+    if (can_copy_as_link && !LLFolderType::lookupIsProtectedType(getPreferredType()))
+    {
+        // Can copy and paste unprotected folders as links
+        return true;
+    }
+
 	// Folders are copyable if items in them are, recursively, copyable.
 	
 	// Get the content of the folder
-- 
GitLab