[tx-robot] updated from transifex
[pub/Android/ownCloud.git] / src / com / owncloud / android / operations / CreateShareWithShareeOperation.java
index cb81ce4..b19d6c2 100644 (file)
@@ -38,8 +38,6 @@ import com.owncloud.android.operations.common.SyncOperation;
 
 public class CreateShareWithShareeOperation extends SyncOperation {
 
-    private static final int READ_ONLY = 1;
-
     protected FileDataStorageManager mStorageManager;
 
     private String mPath;
@@ -79,7 +77,7 @@ public class CreateShareWithShareeOperation extends SyncOperation {
                 mShareeName,
                 false,
                 "",
-                READ_ONLY
+                OCShare.DEFAULT_PERMISSION
         );
         operation.setGetShareDetails(true);
         RemoteOperationResult result = operation.execute(client);
@@ -102,13 +100,8 @@ 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.setPermissions(READ_ONLY);
-        
+        share.setIsFolder(mPath.endsWith(FileUtils.PATH_SEPARATOR));
+
         getStorageManager().saveShare(share);
         
         // Update OCFile with data from share: ShareByLink  and publicLink