X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/729a9b7c77eddad66f25b9ca8cb934d84ea8ee20..refs/heads/sdcard-save:/src/com/owncloud/android/operations/CreateShareViaLinkOperation.java diff --git a/src/com/owncloud/android/operations/CreateShareViaLinkOperation.java b/src/com/owncloud/android/operations/CreateShareViaLinkOperation.java index 52baa417..bed23c70 100644 --- a/src/com/owncloud/android/operations/CreateShareViaLinkOperation.java +++ b/src/com/owncloud/android/operations/CreateShareViaLinkOperation.java @@ -73,10 +73,21 @@ public class CreateShareViaLinkOperation extends SyncOperation { // Check if the share link already exists RemoteOperation operation = new GetRemoteSharesForFileOperation(mPath, false, false); RemoteOperationResult result = operation.execute(client); - // TODO - fix this check; if the user already shared the file with users or group, a share via link will not be created - if (!result.isSuccess() || result.getData().size() <= 0) { - operation = new CreateRemoteShareOperation( + // Create public link if doesn't exist yet + boolean publicShareExists = false; + if (result.isSuccess()) { + OCShare share = null; + for (int i=0 ; i