diff options
author | andreykproductengine <andreykproductengine@lindenlab.com> | 2017-12-01 15:58:22 +0200 |
---|---|---|
committer | andreykproductengine <andreykproductengine@lindenlab.com> | 2017-12-01 15:58:22 +0200 |
commit | 62390a7e0a33f744de059fa51bc96643d707c2ec (patch) | |
tree | 5e4ae4b7dcce17562505185d6d4d6299eec1be7a | |
parent | e7eed4733027ea4122e2b2d89585695ddbe5a559 (diff) |
MAINT-8034 Folder depth was not counted correctly
-rw-r--r-- | indra/newview/llinventoryfunctions.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 8b50e4248e..e056ccebee 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -1178,7 +1178,7 @@ bool can_move_folder_to_marketplace(const LLInventoryCategory* root_folder, LLIn int incoming_folder_depth = get_folder_levels(inv_cat); // Compute the nested folders level we're inserting ourselves in // Note: add 1 when inserting under a listing folder as we need to take the root listing folder in the count - int insertion_point_folder_depth = (root_folder ? get_folder_path_length(root_folder->getUUID(), dest_folder->getUUID()) + 1 : 0); + int insertion_point_folder_depth = (root_folder ? get_folder_path_length(root_folder->getUUID(), dest_folder->getUUID()) + 1 : 1); // Get the version folder: that's where the folders and items counts start from const LLViewerInventoryCategory * version_folder = (insertion_point_folder_depth >= 2 ? gInventory.getFirstDescendantOf(root_folder->getUUID(), dest_folder->getUUID()) : NULL); |