X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/9df957d548b51bf347ab7ba8134699362990f443..f91241566a3eeac3bc160ea10f5e0d52b735efef:/src/com/owncloud/android/operations/CreateShareWithShareeOperation.java diff --git a/src/com/owncloud/android/operations/CreateShareWithShareeOperation.java b/src/com/owncloud/android/operations/CreateShareWithShareeOperation.java index cb81ce46..9b71695e 100644 --- a/src/com/owncloud/android/operations/CreateShareWithShareeOperation.java +++ b/src/com/owncloud/android/operations/CreateShareWithShareeOperation.java @@ -39,6 +39,7 @@ import com.owncloud.android.operations.common.SyncOperation; public class CreateShareWithShareeOperation extends SyncOperation { private static final int READ_ONLY = 1; + private static final int ALL_PRIVILEGES = 31; protected FileDataStorageManager mStorageManager; @@ -79,7 +80,7 @@ public class CreateShareWithShareeOperation extends SyncOperation { mShareeName, false, "", - READ_ONLY + ALL_PRIVILEGES ); operation.setGetShareDetails(true); RemoteOperationResult result = operation.execute(client); @@ -102,11 +103,7 @@ public class CreateShareWithShareeOperation extends SyncOperation { private void updateData(OCShare share) { // Update DB with the response share.setPath(mPath); - if (mPath.endsWith(FileUtils.PATH_SEPARATOR)) { - share.setIsFolder(true); - } else { - share.setIsFolder(false); - } + share.setIsFolder(mPath.endsWith(FileUtils.PATH_SEPARATOR)); share.setPermissions(READ_ONLY); getStorageManager().saveShare(share);