X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/b36914df88ff9abd04c19b422889de894df3a714..98d95b576ead4119ec16719a72d83ca6db82b77a:/src/com/owncloud/android/operations/SynchronizeFileOperation.java diff --git a/src/com/owncloud/android/operations/SynchronizeFileOperation.java b/src/com/owncloud/android/operations/SynchronizeFileOperation.java index b0f2ce26..2f80186a 100644 --- a/src/com/owncloud/android/operations/SynchronizeFileOperation.java +++ b/src/com/owncloud/android/operations/SynchronizeFileOperation.java @@ -101,7 +101,7 @@ public class SynchronizeFileOperation extends RemoteOperation { } else { client.exhaustResponse(propfind.getResponseBodyAsStream()); - result = new RemoteOperationResult(false, status); + result = new RemoteOperationResult(false, status, propfind.getResponseHeaders()); } } @@ -119,7 +119,7 @@ public class SynchronizeFileOperation extends RemoteOperation { // TODO this will be always true after the app is upgraded to database version 2; will result in unnecessary uploads /// decide action to perform depending upon changes - if (localChanged && serverChanged) { + if (!mLocalFile.getEtag().isEmpty() && localChanged && serverChanged) { result = new RemoteOperationResult(ResultCode.SYNC_CONFLICT); } else if (localChanged) { @@ -215,6 +215,8 @@ public class SynchronizeFileOperation extends RemoteOperation { file.setFileLength(we.contentLength()); file.setMimetype(we.contentType()); file.setModificationTimestamp(we.modifiedTimestamp()); + file.setEtag(we.etag()); + return file; }