From: David A. Velasco Date: Fri, 18 Oct 2013 11:16:26 +0000 (+0200) Subject: Disable eTag as a criteria for synchronization of file contents X-Git-Tag: oc-android-1.5.5~155^2~11 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/e3be4babaf7e304b997e3d51cbd298cab7d63409?hp=--cc Disable eTag as a criteria for synchronization of file contents --- e3be4babaf7e304b997e3d51cbd298cab7d63409 diff --git a/src/com/owncloud/android/operations/SynchronizeFileOperation.java b/src/com/owncloud/android/operations/SynchronizeFileOperation.java index fb6ce52f..f02241e6 100644 --- a/src/com/owncloud/android/operations/SynchronizeFileOperation.java +++ b/src/com/owncloud/android/operations/SynchronizeFileOperation.java @@ -112,17 +112,19 @@ public class SynchronizeFileOperation extends RemoteOperation { /// check changes in server and local file boolean serverChanged = false; + /* time for eTag is coming, but not yet if (mServerFile.getEtag() != null) { serverChanged = (!mServerFile.getEtag().equals(mLocalFile.getEtag())); // TODO could this be dangerous when the user upgrades the server from non-tagged to tagged? - } else { + } else { */ // server without etags serverChanged = (mServerFile.getModificationTimestamp() > mLocalFile.getModificationTimestampAtLastSyncForData()); - } + //} boolean localChanged = (mLocalChangeAlreadyKnown || mLocalFile.getLocalModificationTimestamp() > mLocalFile.getLastSyncDateForData()); // 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 (!mLocalFile.getEtag().isEmpty() && localChanged && serverChanged) { + //if (!mLocalFile.getEtag().isEmpty() && localChanged && serverChanged) { + if (localChanged && serverChanged) { result = new RemoteOperationResult(ResultCode.SYNC_CONFLICT); } else if (localChanged) {