If the server has excluded a file, we now exclude it from being

uploaded as well as downloaded.
This commit is contained in:
Wayne Davison
2004-05-18 00:14:10 +00:00
parent 8cbf495a57
commit 97f9dcae6a

View File

@@ -52,6 +52,8 @@ extern int only_existing;
extern int orig_umask;
extern int safe_symlinks;
extern struct exclude_list_struct server_exclude_list;
/* choose whether to skip a particular file */
static int skip_file(char *fname, struct file_struct *file, STRUCT_STAT *st)
@@ -281,6 +283,11 @@ void recv_generator(char *fname, struct file_struct *file, int i, int f_out)
if (verbose > 2)
rprintf(FINFO,"recv_generator(%s,%d)\n",fname,i);
if (server_exclude_list.head
&& check_exclude(&server_exclude_list, fname,
S_ISDIR(file->mode)) < 0)
return;
statret = link_stat(fname,&st);
if (only_existing && statret == -1 && errno == ENOENT) {