summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWayne Davison <wayne@opencoder.net>2022-09-15 10:13:07 -0700
committerWayne Davison <wayne@opencoder.net>2022-09-15 10:13:20 -0700
commit7e634f5355d6dd96c5be7957837cba5a8154c70c (patch)
tree9a4c036e29b1a363eafea4c209093a3c00c89052
parent8fe8cfd60af417f5467f7723075f5ad050b806c8 (diff)
downloadrsync-7e634f5355d6dd96c5be7957837cba5a8154c70c.tar.gz
We always add a slash now that path is cleaned.
-rw-r--r--exclude.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/exclude.c b/exclude.c
index 5c0b0a69..ffe55b16 100644
--- a/exclude.c
+++ b/exclude.c
@@ -555,15 +555,12 @@ void add_implied_include(const char *arg, int skip_daemon_module)
p += arg_len;
}
}
- if (p[-1] != '/') {
- *p++ = '/';
- slash_cnt++;
- }
+ *p++ = '/';
*p++ = '*';
if (recurse)
*p++ = '*';
*p = '\0';
- rule->u.slash_cnt = slash_cnt;
+ rule->u.slash_cnt = slash_cnt + 1;
rule->next = implied_filter_list.head;
implied_filter_list.head = rule;
if (DEBUG_GTE(FILTER, 3))