Просмотр исходного кода

Safe blanket to clean DB if wrong conflicts keep stored

David A. Velasco 10 лет назад
Родитель
Сommit
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);
+                }
+            }
 
         }