[Pkg-owncloud-commits] [owncloud-client] 49/211: Sync engine: Do not write to the database too early

Sandro Knauß hefee-guest at moszumanska.debian.org
Sat Oct 25 09:10:25 UTC 2014


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 9b178c5bb2f39e4902ef99ff42064e25b1453904
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Sat Oct 11 15:38:12 2014 +0200

    Sync engine: Do not write to the database too early
    
    It is possible that we have should_update_etag set to true for files
    that we also need to propagate.  In which case we must not write to the DB
    too early as this could cause data loss.  (cf: issue #2296)
---
 src/mirall/syncengine.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mirall/syncengine.cpp b/src/mirall/syncengine.cpp
index 3c68e08..ae0edf5 100644
--- a/src/mirall/syncengine.cpp
+++ b/src/mirall/syncengine.cpp
@@ -402,7 +402,7 @@ int SyncEngine::treewalkFile( TREE_WALK_FILE *file, bool remote )
     int re = 0;
     switch(file->instruction) {
     case CSYNC_INSTRUCTION_NONE:
-        if (file->should_update_etag && !item._isDirectory) {
+        if (remote && item._should_update_etag && !item._isDirectory && item._instruction == CSYNC_INSTRUCTION_NONE) {
             // Update the database now already  (new fileid or etag or remotePerm)
             // Those are files that were detected as "resolved conflict".
             // They should have been a conflict because they both were new, or both

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list