From 0bd17eff424333b36b431147412ffd0d604422a0 Mon Sep 17 00:00:00 2001
From: Vincent Petry <pvince81@owncloud.com>
Date: Fri, 27 Jun 2014 17:56:09 +0200
Subject: [PATCH] Use file_source to find matching share for nested link shares

---
 core/js/share.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/js/share.js b/core/js/share.js
index 1c59524939..a6f2992148 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -374,7 +374,7 @@ OC.Share={
 			if (data.shares) {
 				$.each(data.shares, function(index, share) {
 					if (share.share_type == OC.Share.SHARE_TYPE_LINK) {
-						if ( !('file_target' in share) ) {
+						if (itemSource === share.file_source || itemSource === share.item_source) {
 							OC.Share.showLink(share.token, share.share_with, itemSource);
 						}
 					} else {
-- 
GitLab