summaryrefslogtreecommitdiff
path: root/exclude.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2000-01-25 14:17:21 +0000
committerAndrew Tridgell <tridge@samba.org>2000-01-25 14:17:21 +0000
commitc36cd3171366e13b6b5d50e2c3a2c7269cd8e89c (patch)
treec1c948fedb209d6b9fbfd9b79cd1853c67f3a1c6 /exclude.c
parent5e12ce118622705111df38043132b336590604b0 (diff)
downloadrsync-c36cd3171366e13b6b5d50e2c3a2c7269cd8e89c.tar.gz
rsync-c36cd3171366e13b6b5d50e2c3a2c7269cd8e89c.tar.bz2
rsync-c36cd3171366e13b6b5d50e2c3a2c7269cd8e89c.zip
the convoluted nest of #ifdefs that is fnmatch.c caught us again. On
my system the LIBC tests meant it never compiled and we used the broken system one. hacked it so it does compile
Diffstat (limited to 'exclude.c')
-rw-r--r--exclude.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/exclude.c b/exclude.c
index fefe2993..1b5373d3 100644
--- a/exclude.c
+++ b/exclude.c
@@ -94,15 +94,17 @@ static int check_one_exclude(char *name,struct exclude_struct *ex,
}
if (ex->regular_exp) {
- if (fnmatch(pattern, name, ex->fnmatch_flags) == 0)
+ if (fnmatch(pattern, name, ex->fnmatch_flags) == 0) {
return 1;
+ }
} else {
int l1 = strlen(name);
int l2 = strlen(pattern);
if (l2 <= l1 &&
strcmp(name+(l1-l2),pattern) == 0 &&
- (l1==l2 || (!match_start && name[l1-(l2+1)] == '/')))
+ (l1==l2 || (!match_start && name[l1-(l2+1)] == '/'))) {
return 1;
+ }
}
return 0;