Removed unused menu a preference resources, and related code
[pub/Android/ownCloud.git] / src / com / owncloud / android / operations / SynchronizeFolderOperation.java
index aaca935..3295668 100644 (file)
@@ -28,8 +28,8 @@ import java.util.List;
 import java.util.Map;
 import java.util.Vector;
 
-import org.apache.commons.httpclient.Header;
 import org.apache.http.HttpStatus;
+import org.apache.jackrabbit.webdav.DavConstants;
 import org.apache.jackrabbit.webdav.MultiStatus;
 import org.apache.jackrabbit.webdav.client.methods.PropFindMethod;
 
@@ -135,7 +135,9 @@ public class SynchronizeFolderOperation extends RemoteOperation {
             Log_OC.d(TAG, "Synchronizing " + mAccount.name + ", fetching files in " + mRemotePath);
             
             // remote request 
-            query = new PropFindMethod(client.getBaseUri() + WebdavUtils.encodePath(mRemotePath));
+            query = new PropFindMethod(client.getBaseUri() + WebdavUtils.encodePath(mRemotePath),
+                    DavConstants.PROPFIND_ALL_PROP,
+                    DavConstants.DEPTH_1);
             int status = client.executeMethod(query);
             
             // check and process response   - /// TODO take into account all the possible status per child-resource
@@ -243,14 +245,10 @@ public class SynchronizeFolderOperation extends RemoteOperation {
                     result = new RemoteOperationResult(ResultCode.SYNC_CONFLICT);   // should be different result, but will do the job
                             
                 } else {
-                    result = new RemoteOperationResult(true, status);
-                    Header hCookie = query.getResponseHeader("Cookie");
-                    if (hCookie != null) {
-                        Log_OC.d(TAG, "PROPFIND cookie: " + hCookie.getValue());
-                    }
+                    result = new RemoteOperationResult(true, status, query.getResponseHeaders());
                 }
             } else {
-                result = new RemoteOperationResult(false, status);
+                result = new RemoteOperationResult(false, status, query.getResponseHeaders());
             }