X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/a2aa0479fc590a42b2167e5748d374f2df29dfad..HEAD:/src/com/owncloud/android/operations/SynchronizeFileOperation.java?ds=inline diff --git a/src/com/owncloud/android/operations/SynchronizeFileOperation.java b/src/com/owncloud/android/operations/SynchronizeFileOperation.java index 1998181c..bc0caf19 100644 --- a/src/com/owncloud/android/operations/SynchronizeFileOperation.java +++ b/src/com/owncloud/android/operations/SynchronizeFileOperation.java @@ -222,7 +222,7 @@ public class SynchronizeFileOperation extends SyncOperation { //if (!mLocalFile.getEtag().isEmpty() && localChanged && serverChanged) { if (localChanged && serverChanged) { result = new RemoteOperationResult(ResultCode.SYNC_CONFLICT); - getStorageManager().saveConflict(mLocalFile, true); + getStorageManager().saveConflict(mLocalFile, mServerFile.getEtag()); } else if (localChanged) { if (mSyncFileContents && mAllowUploads) { @@ -263,7 +263,11 @@ public class SynchronizeFileOperation extends SyncOperation { result = new RemoteOperationResult(ResultCode.OK); } - } + // safe blanket: sync'ing a not in-conflict file will clean wrong conflict markers in ancestors + if (result.getCode() != ResultCode.SYNC_CONFLICT) { + getStorageManager().saveConflict(mLocalFile, null); + } + } }