Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
the convoluted nest of #ifdefs that is fnmatch.c caught us again. On
[rsync/rsync.git]
/
exclude.c
diff --git
a/exclude.c
b/exclude.c
index
fefe299
..
1b5373d
100644
(file)
--- 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 (ex->regular_exp) {
- if (fnmatch(pattern, name, ex->fnmatch_flags) == 0)
+ if (fnmatch(pattern, name, ex->fnmatch_flags) == 0)
{
return 1;
return 1;
+ }
} else {
int l1 = strlen(name);
int l2 = strlen(pattern);
if (l2 <= l1 &&
strcmp(name+(l1-l2),pattern) == 0 &&
} 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 1;
+ }
}
return 0;
}
return 0;