X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/720b47f2611d277684b2ec35d11dc3feedb207fe..98ae8c3e383d4939e1293d3da7ad8298a80502eb:/exclude.c diff --git a/exclude.c b/exclude.c index 1c51607f..935c0c56 100644 --- a/exclude.c +++ b/exclude.c @@ -24,8 +24,9 @@ #include "rsync.h" extern int verbose; +extern int am_server; -static char **exclude_list = NULL; +static char **exclude_list; static int is_regex(char *str) { @@ -86,7 +87,7 @@ void add_exclude_list(char *pattern,char ***list) if (strcmp(pattern,"!") == 0) { if (verbose > 2) - fprintf(stderr,"clearing exclude list\n"); + fprintf(FINFO,"clearing exclude list\n"); while ((len)--) free((*list)[len]); free((*list)); @@ -104,7 +105,7 @@ void add_exclude_list(char *pattern,char ***list) out_of_memory("add_exclude"); if (verbose > 2) - fprintf(stderr,"add_exclude(%s)\n",pattern); + fprintf(FINFO,"add_exclude(%s)\n",pattern); (*list)[len+1] = NULL; } @@ -121,8 +122,8 @@ char **make_exclude_list(char *fname,char **list1,int fatal) char line[MAXPATHLEN]; if (!f) { if (fatal) { - fprintf(stderr,"%s : %s\n",fname,strerror(errno)); - exit(1); + fprintf(FERROR,"%s : %s\n",fname,strerror(errno)); + exit_cleanup(1); } return list; } @@ -188,7 +189,7 @@ void add_cvs_excludes(void) for (i=0; cvs_ignore_list[i]; i++) add_exclude(cvs_ignore_list[i]); - if ((p=getenv("HOME"))) { + if ((p=getenv("HOME")) && strlen(p) < (MAXPATHLEN-12)) { sprintf(fname,"%s/.cvsignore",p); add_exclude_file(fname,0); }