diff --git a/src/com/owncloud/android/lib/resources/shares/GetRemoteSharesForFileOperation.java b/src/com/owncloud/android/lib/resources/shares/GetRemoteSharesForFileOperation.java index 37241844..1518b516 100644 --- a/src/com/owncloud/android/lib/resources/shares/GetRemoteSharesForFileOperation.java +++ b/src/com/owncloud/android/lib/resources/shares/GetRemoteSharesForFileOperation.java @@ -117,8 +117,10 @@ public class GetRemoteSharesForFileOperation extends RemoteOperation { ArrayList sharesObjects = new ArrayList(); for (OCShare share: mShares) { // Build the link - if (( share.getShareLink() == null) && - (share.getToken().length() > 0)) { + if ( share.getShareType() == ShareType.PUBLIC_LINK && + share.getShareLink() == null && + share.getToken().length() > 0 + ) { String linkToken = ShareUtils.getSharingToken( client.getOwnCloudVersion()); share.setShareLink(client.getBaseUri() + linkToken + diff --git a/src/com/owncloud/android/lib/resources/shares/ShareXMLParser.java b/src/com/owncloud/android/lib/resources/shares/ShareXMLParser.java index b19d5772..cb984fd4 100644 --- a/src/com/owncloud/android/lib/resources/shares/ShareXMLParser.java +++ b/src/com/owncloud/android/lib/resources/shares/ShareXMLParser.java @@ -348,9 +348,7 @@ public class ShareXMLParser { } private boolean isValidShare(OCShare share) { - return ((share.getIdRemoteShared() > -1) && - (share.getShareType() == ShareType.PUBLIC_LINK) // at this moment we only care about public shares - ); + return (share.getIdRemoteShared() > -1); } private void fixPathForFolder(OCShare share) {