#define MALLOC(ap, i) (ap ? string_area_malloc(ap, i) : malloc(i))
/* create a file_struct for a named file */
-struct file_struct *make_file(int f, char *fname, struct string_area **ap)
+struct file_struct *make_file(int f, char *fname, struct string_area **ap,
+ int noexcludes)
{
struct file_struct *file;
STRUCT_STAT st;
char cleaned_name[MAXPATHLEN];
char linkbuf[MAXPATHLEN];
extern int delete_excluded;
+ extern int module_id;
strlcpy(cleaned_name, fname, MAXPATHLEN);
cleaned_name[MAXPATHLEN-1] = 0;
return NULL;
}
+ /* we use noexcludes from backup.c */
+ if (noexcludes) goto skip_excludes;
+
if (S_ISDIR(st.st_mode) && !recurse) {
rprintf(FINFO,"skipping directory %s\n",fname);
return NULL;
/* f is set to -1 when calculating deletion file list */
if (((f != -1) || !delete_excluded) && !match_file_name(fname,&st))
return NULL;
-
+
+
+ if (lp_ignore_nonreadable(module_id) && access(fname, R_OK) != 0)
+ return NULL;
+
+ skip_excludes:
+
if (verbose > 2)
rprintf(FINFO,"make_file(%d,%s)\n",f,fname);
{
struct file_struct *file;
- file = make_file(f,fname, &flist->string_area);
+ file = make_file(f,fname, &flist->string_area, 0);
if (!file) return;