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
just a stub for now
[rsync/rsync.git]
/
exclude.c
diff --git
a/exclude.c
b/exclude.c
index
83c0b39
..
b2831e4
100644
(file)
--- a/
exclude.c
+++ b/
exclude.c
@@
-24,7
+24,6
@@
#include "rsync.h"
extern int verbose;
#include "rsync.h"
extern int verbose;
-extern int am_server;
static char **exclude_list;
static char **exclude_list;
@@
-43,6
+42,8
@@
static int check_one_exclude(char *name,char *pattern)
if (!name[0]) return 0;
if (!name[0]) return 0;
+ if (*pattern == '/' && *name != '/') pattern++;
+
if (is_regex(pattern)) {
if (fnmatch(pattern, name, 0) == 0)
return 1;
if (is_regex(pattern)) {
if (fnmatch(pattern, name, 0) == 0)
return 1;
@@
-87,7
+88,7
@@
void add_exclude_list(char *pattern,char ***list)
if (strcmp(pattern,"!") == 0) {
if (verbose > 2)
if (strcmp(pattern,"!") == 0) {
if (verbose > 2)
-
f
printf(FINFO,"clearing exclude list\n");
+
r
printf(FINFO,"clearing exclude list\n");
while ((len)--)
free((*list)[len]);
free((*list));
while ((len)--)
free((*list)[len]);
free((*list));
@@
-105,7
+106,7
@@
void add_exclude_list(char *pattern,char ***list)
out_of_memory("add_exclude");
if (verbose > 2)
out_of_memory("add_exclude");
if (verbose > 2)
-
f
printf(FINFO,"add_exclude(%s)\n",pattern);
+
r
printf(FINFO,"add_exclude(%s)\n",pattern);
(*list)[len+1] = NULL;
}
(*list)[len+1] = NULL;
}
@@
-122,7
+123,7
@@
char **make_exclude_list(char *fname,char **list1,int fatal)
char line[MAXPATHLEN];
if (!f) {
if (fatal) {
char line[MAXPATHLEN];
if (!f) {
if (fatal) {
-
f
printf(FERROR,"%s : %s\n",fname,strerror(errno));
+
r
printf(FERROR,"%s : %s\n",fname,strerror(errno));
exit_cleanup(1);
}
return list;
exit_cleanup(1);
}
return list;