From: Wayne Davison Date: Sat, 12 Aug 2006 16:22:03 +0000 (+0000) Subject: Fixed an exclude bug with --relative excluding "/". X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/commitdiff_plain/29930a9fd263792559958b35db93914d69cffeb1 Fixed an exclude bug with --relative excluding "/". --- diff --git a/exclude.c b/exclude.c index bc180f20..fdb5c776 100644 --- a/exclude.c +++ b/exclude.c @@ -500,6 +500,8 @@ static int rule_matches(char *name, struct filter_struct *ex, int name_is_dir) char *p, *pattern = ex->pattern; const char *strings[16]; /* more than enough */ + if (*name == '/') + name++; if (!*name) return 0; @@ -531,8 +533,6 @@ static int rule_matches(char *name, struct filter_struct *ex, int name_is_dir) if (*pattern == '/') { anchored_match = 1; pattern++; - if (strings[0][0] == '/') - strings[0]++; } if (!anchored_match && ex->u.slash_cnt