X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/bf18b7ca671e877715c1b139ae3859de6858ad54..027428eb1d7524815d9b29f825033d7902258db5:/main.c diff --git a/main.c b/main.c index bb9cfde5..b090f668 100644 --- 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. */ @@ -670,9 +671,7 @@ int client_run(int f_in, int f_out, pid_t pid, int argc, char *argv[]) char *local_name = NULL; cleanup_child_pid = pid; - if (read_batch) { - assert(am_sender == 0); - } else { + if (!read_batch) { set_nonblocking(f_in); set_nonblocking(f_out); }