return (st2.st_dev != filesystem_dev);
}
-static struct file_struct *make_file(char *fname)
+static struct file_struct *make_file(int f, char *fname)
{
struct file_struct *file;
STRUCT_STAT st;
char *p;
char cleaned_name[MAXPATHLEN];
char linkbuf[MAXPATHLEN];
+ extern int delete_excluded;
strlcpy(cleaned_name, fname, MAXPATHLEN);
cleaned_name[MAXPATHLEN-1] = 0;
return NULL;
}
- if (!match_file_name(fname,&st))
+ /* f is set to -1 when calculating deletion file list */
+ if (((f != -1) || !delete_excluded) && !match_file_name(fname,&st))
return NULL;
if (verbose > 2)
- rprintf(FINFO,"make_file(%s)\n",fname);
+ rprintf(FINFO,"make_file(%d,%s)\n",f,fname);
file = (struct file_struct *)malloc(sizeof(*file));
if (!file) out_of_memory("make_file");
{
struct file_struct *file;
- file = make_file(fname);
+ file = make_file(f,fname);
if (!file) return;
l = strlen(fname);
if (l != 1 && fname[l-1] == '/') {
- strlcat(fname,".",MAXPATHLEN);
+ if ((l == 2) && (fname[0] == '.')) {
+ /* Turn ./ into just . rather than ./.
+ This was put in to avoid a problem with
+ rsync -aR --delete from ./
+ The send_file_name() below of ./ was
+ mysteriously preventing deletes */
+ fname[1] = 0;
+ } else {
+ strlcat(fname,".",MAXPATHLEN);
+ }
}
if (link_stat(fname,&st) != 0) {