Commit 027428eb authored by Wayne Davison's avatar Wayne Davison

Got rid of the erroneous --dry-run short-circuit in the directory

handling.
parent 15778afb
...@@ -292,18 +292,15 @@ static void recv_generator(char *fname, struct file_struct *file, int i, ...@@ -292,18 +292,15 @@ static void recv_generator(char *fname, struct file_struct *file, int i,
* to prepare appropriately. If there is already a * to prepare appropriately. If there is already a
* file of that name and it is *not* a directory, then * file of that name and it is *not* a directory, then
* we need to delete it. If it doesn't exist, then * we need to delete it. If it doesn't exist, then
* recursively create it. */ * (perhaps recursively) create it. */
if (dry_run)
return; /* TODO: causes inaccuracies -- fix */
if (statret == 0 && !S_ISDIR(st.st_mode)) { if (statret == 0 && !S_ISDIR(st.st_mode)) {
delete_file(fname, DEL_TERSE); delete_file(fname, DEL_TERSE);
statret = -1; statret = -1;
} }
if (statret != 0 && do_mkdir(fname,file->mode) != 0 && errno != EEXIST) { if (statret != 0 && do_mkdir(fname,file->mode) != 0 && errno != EEXIST) {
if (!(relative_paths && errno == ENOENT if (!relative_paths || errno != ENOENT
&& create_directory_path(fname, orig_umask) == 0 || create_directory_path(fname, orig_umask) < 0
&& do_mkdir(fname, file->mode) == 0)) { || do_mkdir(fname, file->mode) < 0) {
rsyserr(FERROR, errno, rsyserr(FERROR, errno,
"recv_generator: mkdir %s failed", "recv_generator: mkdir %s failed",
full_fname(fname)); full_fname(fname));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment