--- embedaddon/rsync/receiver.c 2013/10/14 07:51:14 1.1.1.2 +++ embedaddon/rsync/receiver.c 2016/11/01 09:54:32 1.1.1.3 @@ -3,7 +3,7 @@ * * Copyright (C) 1996-2000 Andrew Tridgell * Copyright (C) 1996 Paul Mackerras - * Copyright (C) 2003-2013 Wayne Davison + * Copyright (C) 2003-2015 Wayne Davison * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -30,6 +30,7 @@ extern int inc_recurse; extern int log_before_transfer; extern int stdout_format_has_i; extern int logfile_format_has_i; +extern int want_xattr_optim; extern int csum_length; extern int read_batch; extern int write_batch; @@ -61,6 +62,8 @@ extern char sender_file_sum[MAX_DIGEST_LEN]; extern struct file_list *cur_flist, *first_flist, *dir_flist; extern filter_rule_list daemon_filter_list; +BOOL want_progress_now; + static struct bitbag *delayed_bits = NULL; static int phase = 0, redoing = 0; static flist_ndx_list batch_redo_list; @@ -113,10 +116,13 @@ int get_tmpname(char *fnametmp, const char *fname, BOO } } else f = fname; - if (*f == '.') /* avoid an extra leading dot for OS X's sake */ - f++; - fnametmp[length++] = '.'; + if (!tmpdir) { /* using a tmpdir avoids the leading dot on our temp names */ + if (*f == '.') /* avoid an extra leading dot for OS X's sake */ + f++; + fnametmp[length++] = '.'; + } + /* The maxname value is bufsize, and includes space for the '\0'. * NAME_MAX needs an extra -1 for the name's leading dot. */ maxname = MIN(MAXPATHLEN - length - TMPNAME_SUFFIX_LEN, @@ -298,6 +304,11 @@ static int receive_data(int f_in, char *fname_r, int f while ((i = recv_token(f_in, &data)) != 0) { if (INFO_GTE(PROGRESS, 1)) show_progress(offset, total_size); + else if (want_progress_now) { + rprintf(FINFO, "%s\n", fname); + end_progress(offset); + } + want_progress_now = False; if (allowed_lull) maybe_send_keepalive(time(NULL), MSK_ALLOW_FLUSH | MSK_ACTIVE_RECEIVER); @@ -581,7 +592,7 @@ int recv_files(int f_in, int f_out, char *local_name) #ifdef SUPPORT_XATTRS if (preserve_xattrs && iflags & ITEM_REPORT_XATTR && do_xfers - && (protocol_version < 31 || !BITS_SET(iflags, ITEM_XNAME_FOLLOWS|ITEM_LOCAL_CHANGE))) + && !(want_xattr_optim && BITS_SET(iflags, ITEM_XNAME_FOLLOWS|ITEM_LOCAL_CHANGE))) recv_xattr_request(file, f_in); #endif @@ -668,8 +679,7 @@ int recv_files(int f_in, int f_out, char *local_name) } } - if (!log_before_transfer) - remember_initial_stats(); + remember_initial_stats(); if (!do_xfers) { /* log the transfer */ log_item(FCLIENT, file, iflags, NULL);