var path = dir;
// Search for possible parent folders that are shared
while (path != last) {
- if (path == data['path']) {
+ if (path == data['path'] && !data['link']) {
var actions = $('.fileactions .action[data-action="Share"]');
$.each(actions, function(index, action) {
var img = $(action).find('img');
if (data.shares) {
$.each(data.shares, function(index, share) {
if (share.share_type == OC.Share.SHARE_TYPE_LINK) {
- OC.Share.showLink(share.token, share.share_with, itemSource);
+ if ( !('file_target' in share) ) {
+ OC.Share.showLink(share.token, share.share_with, itemSource);
+ }
} else {
if (share.collection) {
OC.Share.addShareWith(share.share_type, share.share_with, share.share_with_displayname, share.permissions, possiblePermissions, share.collection);