[Pkg-owncloud-commits] [owncloud-client] 162/175: Update: Check exclusion when reading from db. #3172

Sandro Knauß hefee-guest at moszumanska.debian.org
Sat Aug 8 10:36:39 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 f130a2716e42c09d3ab2c115e8b42c455665f7f1
Author: Christian Kamm <kamm at incasoftware.de>
Date:   Fri Jun 19 11:48:53 2015 +0200

    Update: Check exclusion when reading from db. #3172
---
 csync/src/csync_statedb.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/csync/src/csync_statedb.c b/csync/src/csync_statedb.c
index 1ba406f..49c098d 100644
--- a/csync/src/csync_statedb.c
+++ b/csync/src/csync_statedb.c
@@ -39,6 +39,7 @@
 #include "csync_statedb.h"
 #include "csync_util.h"
 #include "csync_misc.h"
+#include "csync_exclude.h"
 
 #include "c_string.h"
 #include "c_jhash.h"
@@ -481,6 +482,21 @@ int csync_statedb_get_below_path( CSYNC *ctx, const char *path ) {
 
         rc = _csync_file_stat_from_metadata_table( &st, stmt);
         if( st ) {
+            /* Check for exclusion from the tree.
+             * Note that this is only a safety net in case the ignore list changes
+             * without a full remote discovery being triggered. */
+            CSYNC_EXCLUDE_TYPE excluded = csync_excluded(ctx, st->path, st->type);
+            if (excluded != CSYNC_NOT_EXCLUDED) {
+                CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "%s excluded (%d)", st->path, excluded);
+
+                if (excluded == CSYNC_FILE_EXCLUDE_AND_REMOVE
+                        || excluded == CSYNC_FILE_SILENTLY_EXCLUDED) {
+                    continue;
+                }
+
+                st->instruction = CSYNC_INSTRUCTION_IGNORE;
+            }
+
             /* store into result list. */
             if (c_rbtree_insert(ctx->remote.tree, (void *) st) < 0) {
                 SAFE_FREE(st);

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