Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaas Freitag <freitag@owncloud.com>2016-06-20 16:50:20 +0300
committerDaniel Molkentin <danimo@owncloud.com>2016-06-20 16:52:12 +0300
commit0977eef0757cd1caa90220ba9bea4cb5e58b6757 (patch)
treefa1b28761ea7103a51fbf93d938fb790c5f7a7aa
parent8b147017bb7fd266edf7140c3ce11b1e8c123f3f (diff)
excludes: Only log if the pattern was really logged. (#4989)
-rw-r--r--csync/src/csync_exclude.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/csync/src/csync_exclude.c b/csync/src/csync_exclude.c
index bad25f8d2..d432781ba 100644
--- a/csync/src/csync_exclude.c
+++ b/csync/src/csync_exclude.c
@@ -52,7 +52,7 @@ int _csync_exclude_add(c_strlist_t **inList, const char *string) {
for (i = 0; i < (*inList)->count; ++i) {
char *pattern = (*inList)->vector[i];
if (c_streq(pattern, string)) {
- return 0;
+ return 1;
}
}
}
@@ -151,8 +151,10 @@ int csync_exclude_load(const char *fname, c_strlist_t **list) {
buf[i] = '\0';
if (*entry != '#') {
const char *unescaped = csync_exclude_expand_escapes(entry);
- CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "Adding entry: %s", unescaped);
rc = _csync_exclude_add(list, unescaped);
+ if( rc == 0 ) {
+ CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "Adding entry: %s", unescaped);
+ }
SAFE_FREE(unescaped);
if (rc < 0) {
goto out;