From: Wayne Davison Date: Thu, 15 Sep 2022 17:13:07 +0000 (-0700) Subject: We always add a slash now that path is cleaned. X-Git-Tag: v3.2.7pre1~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e634f5355d6dd96c5be7957837cba5a8154c70c;p=thirdparty%2Frsync.git We always add a slash now that path is cleaned. --- 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))