X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/76cb2a3a4f2708c07e6ac81a23b2d39aad419bbe..7162c65df75c2cf20423e74776c9f6037518b6b0:/main.c diff --git a/main.c b/main.c index 4c088415..603bd0c5 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. */ @@ -540,7 +541,6 @@ static int do_recv(int f_in,int f_out,struct file_list *flist,char *local_name) generate_files(f_out, flist, local_name, name_pipe[1]); - get_redo_num(); /* Read final MSG_DONE and any prior messages. */ report(-1); io_flush(FULL_FLUSH); if (protocol_version >= 24) { @@ -829,8 +829,7 @@ static int start_client(int argc, char *argv[]) if (p) { rsync_port = atoi(p+1); *p = '\0'; - } else - rsync_port = RSYNC_PORT; + } return start_socket_client(host, path, argc-1, argv+1); } @@ -888,8 +887,7 @@ static int start_client(int argc, char *argv[]) if (p) { rsync_port = atoi(p+1); *p = '\0'; - } else - rsync_port = RSYNC_PORT; + } return start_socket_client(host, path, argc-1, argv); }