소스 검색

Safe blanket to clean DB if wrong conflicts keep stored

David A. Velasco 9 년 전
부모
커밋
b8a3dc71e4
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      src/com/owncloud/android/operations/SynchronizeFileOperation.java

+ 5 - 1
src/com/owncloud/android/operations/SynchronizeFileOperation.java

@@ -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, false);
+                }
+            }
 
         }