X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/70352269ba69d983d714f76c35af087f395202a9..41b84ce012d7e45f580fa1ccdc7cc480f72578d2:/generator.c diff --git a/generator.c b/generator.c index b9197c71..ec0e04d1 100644 --- a/generator.c +++ b/generator.c @@ -31,6 +31,7 @@ extern int daemon_log_format_has_i; extern int am_root; extern int am_server; extern int am_daemon; +extern int do_progress; extern int recurse; extern int relative_paths; extern int keep_dirlinks; @@ -70,7 +71,6 @@ extern int compare_dest; extern int copy_dest; extern int link_dest; extern int whole_file; -extern int local_server; extern int list_only; extern int read_batch; extern int only_existing; @@ -1112,6 +1112,7 @@ void generate_files(int f_out, struct file_list *flist, char *local_name) int need_retouch_dir_perms = 0; int save_only_existing = only_existing; int save_opt_ignore_existing = opt_ignore_existing; + int save_do_progress = do_progress; allowed_lull = read_batch ? 0 : (io_timeout + 1) / 2; lull_mod = allowed_lull * 5; @@ -1141,6 +1142,7 @@ void generate_files(int f_out, struct file_list *flist, char *local_name) if (delete_before && !local_name && flist->count > 0) do_delete_pass(flist); + do_progress = 0; if (whole_file < 0) whole_file = 0; @@ -1167,7 +1169,8 @@ void generate_files(int f_out, struct file_list *flist, char *local_name) /* We need to ensure that any dirs we create have writeable * permissions during the time we are putting files within * them. This is then fixed after the transfer is done. */ - if (!am_root && S_ISDIR(file->mode) && !(file->mode & S_IWUSR)) { + if (!am_root && S_ISDIR(file->mode) && !(file->mode & S_IWUSR) + && !list_only) { int mode = file->mode | S_IWUSR; /* user write */ char *fname = local_name ? local_name : fbuf; if (do_chmod(fname, mode & CHMOD_BITS) < 0) { @@ -1238,6 +1241,7 @@ void generate_files(int f_out, struct file_list *flist, char *local_name) get_redo_num(itemizing, code); } + do_progress = save_do_progress; if (delete_after && !local_name && flist->count > 0) do_delete_pass(flist);