projects
/
pub
/
Android
/
ownCloud.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[tx-robot] updated from transifex
[pub/Android/ownCloud.git]
/
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
045f9b2
..
bc0caf1
100644
(file)
--- 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);
//if (!mLocalFile.getEtag().isEmpty() && localChanged && serverChanged) {
if (localChanged && serverChanged) {
result = new RemoteOperationResult(ResultCode.SYNC_CONFLICT);
- getStorageManager().saveConflict(mLocalFile
.getFileId(), true
);
+ getStorageManager().saveConflict(mLocalFile
, mServerFile.getEtag()
);
} else if (localChanged) {
if (mSyncFileContents && mAllowUploads) {
} else if (localChanged) {
if (mSyncFileContents && mAllowUploads) {
@@
-263,7
+263,11
@@
public class SynchronizeFileOperation extends SyncOperation {
result = new RemoteOperationResult(ResultCode.OK);
}
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);
+ }
+ }
}
}