Safe blanket to clean DB if wrong conflicts keep stored
authorDavid A. Velasco <dvelasco@solidgear.es>
Fri, 21 Aug 2015 12:20:50 +0000 (14:20 +0200)
committerDavid A. Velasco <dvelasco@solidgear.es>
Fri, 25 Sep 2015 13:13:51 +0000 (15:13 +0200)
src/com/owncloud/android/operations/SynchronizeFileOperation.java

index 1998181..e7ced8e 100644 (file)
@@ -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);
+                }
+            }
 
         }