[Pkg-owncloud-commits] [owncloud-client] 321/498: Sync: Only copy the hasIgnoredFlag for the remote side.

Sandro Knauß hefee-guest at moszumanska.debian.org
Tue Aug 11 14:49:02 UTC 2015


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 9461e4ccd1fd33199c02c76353fec69518e859e4
Author: Klaas Freitag <freitag at owncloud.com>
Date:   Mon Jul 13 15:42:16 2015 +0200

    Sync: Only copy the hasIgnoredFlag for the remote side.
    
    Also added some documentation about the handling.
---
 src/libsync/syncengine.cpp | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/src/libsync/syncengine.cpp b/src/libsync/syncengine.cpp
index 53fb7df..76fda75 100644
--- a/src/libsync/syncengine.cpp
+++ b/src/libsync/syncengine.cpp
@@ -348,10 +348,25 @@ int SyncEngine::treewalkFile( TREE_WALK_FILE *file, bool remote )
     if (file->remotePerm && file->remotePerm[0]) {
         item->_remotePerm = QByteArray(file->remotePerm);
     }
+
     item->_should_update_metadata = item->_should_update_metadata || file->should_update_metadata;
 
-    item->_hasIgnoredFiles    = file->has_ignored_files > 0 ? true : false;
-    qDebug() << "HAS IGNORED FILES for " << item->_file << item->_hasIgnoredFiles << key;
+    /* The flag "serverHasIgnoredFiles" is true if item in question is a directory
+     * that has children which are ignored in sync, either because the files are
+     * matched by an ignore pattern, or because they are  hidden.
+     *
+     * Only the information about the server side ignored files is stored to the
+     * database and thus written to the item here. For the local repository its
+     * generated by the walk through the real file tree by discovery phase.
+     *
+     * It needs to go to the sync journal becasue the stat information about remote
+     * files are often read from database rather than being pulled from remote.
+     */
+    if( remote ) {
+        item->_serverHasIgnoredFiles    = (file->has_ignored_files > 0);
+    }
+
+    qDebug() << "HAS IGNORED FILES for " << item->_file << item->_serverHasIgnoredFiles << key;
 
     // record the seen files to be able to clean the journal later
     _seenFiles.insert(item->_file);

-- 
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