Version server is checked every time the root folder is refreshed, and both version...
[pub/Android/ownCloud.git] / src / com / owncloud / android / operations / CreateShareOperation.java
index 3376a9e..7b64653 100644 (file)
@@ -92,13 +92,11 @@ public class CreateShareOperation extends SyncOperation {
                 OCShare share = (OCShare) result.getData().get(0);
 
                 // Update DB with the response
+                share.setPath(mPath);
                 if (mPath.endsWith(FileUtils.PATH_SEPARATOR)) {
-                    share.setPath(mPath.substring(0, mPath.length()-1));
-                    share.setIsDirectory(true);
-                    
+                    share.setIsFolder(true);
                 } else {
-                    share.setPath(mPath);
-                    share.setIsDirectory(false);
+                    share.setIsFolder(false);
                 }
                 share.setPermissions(mPermissions);