X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/7162c65df75c2cf20423e74776c9f6037518b6b0..9f125ea7c1a55f8c86b2efe296ba750d7ccb9106:/main.c diff --git a/main.c b/main.c index 603bd0c5..306673a5 100644 --- a/main.c +++ b/main.c @@ -671,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); } @@ -732,7 +730,7 @@ int client_run(int f_in, int f_out, pid_t pid, int argc, char *argv[]) exit_cleanup(status); } - if (argc == 0) + if (argc == 0 && !list_only) list_only = 1; if (!read_batch) @@ -964,9 +962,8 @@ static int start_client(int argc, char *argv[]) } /* ... or no dest at all */ - if (!am_sender && argc == 0) { + if (!am_sender && argc == 0 && !list_only) list_only = 1; - } pid = do_cmd(shell_cmd,shell_machine,shell_user,shell_path, &f_in,&f_out);