a file that can't use it, while missing out on giving it to a file
that could use it.
-based-on: 8b1b81e054bdcc927ff26f20f424e034bd273175
+based-on: f9e29dfb0912f2689ad10a7ba14ebb3ed43cf153
diff --git a/backup.c b/backup.c
--- a/backup.c
+++ b/backup.c
static inline int mtime_differs(STRUCT_STAT *stp, struct file_struct *file)
{
#ifdef ST_MTIME_NSEC
-@@ -1179,6 +1320,7 @@ static void list_file_entry(struct file_struct *f)
+@@ -1182,6 +1323,7 @@ static void list_file_entry(struct file_struct *f)
}
}
static int phase = 0;
static int dflt_perms;
-@@ -1315,7 +1457,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1318,7 +1460,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
&& do_stat(dn, &sx.st) < 0) {
if (dry_run)
goto parent_is_dry_missing;
rsyserr(FERROR_XFER, errno,
"recv_generator: mkdir %s failed",
full_fname(dn));
-@@ -1468,7 +1610,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1471,7 +1613,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
}
if (real_ret != 0 && do_mkdir(fname,file->mode|added_perms) < 0 && errno != EEXIST) {
if (!relative_paths || errno != ENOENT
|| (do_mkdir(fname, file->mode|added_perms) < 0 && errno != EEXIST)) {
rsyserr(FERROR_XFER, errno,
"recv_generator: mkdir %s failed",
-@@ -1516,9 +1658,12 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1519,9 +1661,12 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
}
else if (delete_during && f_out != -1 && !phase
&& !(file->flags & FLAG_MISSING_DIR)) {
change_local_filter_dir(fname, strlen(fname), F_DEPTH(file));
}
prior_dir_file = file;
-@@ -1786,8 +1931,14 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1789,8 +1934,14 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
goto cleanup;
}
#endif
rsyserr(FERROR_XFER, stat_errno, "recv_generator: failed to stat %s",
full_fname(fname));
goto cleanup;
-@@ -2253,6 +2404,12 @@ void generate_files(int f_out, const char *local_name)
+@@ -2256,6 +2407,12 @@ void generate_files(int f_out, const char *local_name)
if (DEBUG_GTE(GENR, 1))
rprintf(FINFO, "generator starting pid=%d\n", (int)getpid());
if (delete_before && !solo_file && cur_flist->used > 0)
do_delete_pass();
if (delete_during == 2) {
-@@ -2261,7 +2418,7 @@ void generate_files(int f_out, const char *local_name)
+@@ -2264,7 +2421,7 @@ void generate_files(int f_out, const char *local_name)
}
info_levels[INFO_FLIST] = info_levels[INFO_PROGRESS] = 0;
whole_file = 0;
if (DEBUG_GTE(FLIST, 1)) {
rprintf(FINFO, "delta-transmission %s\n",
-@@ -2297,7 +2454,7 @@ void generate_files(int f_out, const char *local_name)
+@@ -2300,7 +2457,7 @@ void generate_files(int f_out, const char *local_name)
dirdev = MAKEDEV(DEV_MAJOR(devp), DEV_MINOR(devp));
} else
dirdev = MAKEDEV(0, 0);
} else
change_local_filter_dir(fbuf, strlen(fbuf), F_DEPTH(fp));
}
-@@ -2344,7 +2501,21 @@ void generate_files(int f_out, const char *local_name)
+@@ -2347,7 +2504,21 @@ void generate_files(int f_out, const char *local_name)
} while ((cur_flist = cur_flist->next) != NULL);
if (delete_during)