We also need the "name pipe" from the generator to the receiver
authorWayne Davison <wayned@samba.org>
Fri, 14 Jan 2005 18:18:31 +0000 (18:18 +0000)
committerWayne Davison <wayned@samba.org>
Fri, 14 Jan 2005 18:18:31 +0000 (18:18 +0000)
when --partial-dir was specified.

main.c

diff --git a/main.c b/main.c
index bb9cfde..603bd0c 100644 (file)
--- a/main.c
+++ b/main.c
@@ -59,6 +59,7 @@ extern int filesfrom_fd;
 extern pid_t cleanup_child_pid;
 extern char *files_from;
 extern char *remote_filesfrom_file;
+extern char *partial_dir;
 extern char *basis_dir[];
 extern char *rsync_path;
 extern char *shell_cmd;
@@ -463,7 +464,7 @@ static int do_recv(int f_in,int f_out,struct file_list *flist,char *local_name)
        int pid;
        int status = 0;
        int error_pipe[2], name_pipe[2];
-       BOOL need_name_pipe = basis_dir[0] && !dry_run;
+       BOOL need_name_pipe = (basis_dir[0] || partial_dir) && !dry_run;
 
        /* The receiving side mustn't obey this, or an existing symlink that
         * points to an identical file won't be replaced by the referent. */