From: Wayne Davison Date: Thu, 28 Nov 2013 19:03:48 +0000 (-0800) Subject: Tweak log_delete() to send MSG_DELETED more. X-Git-Tag: v3.1.1pre1~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32540aa09109f5f95aac2927928abde4a9ce7b41;p=thirdparty%2Frsync.git Tweak log_delete() to send MSG_DELETED more. If the client is the sender and it is wanting to log deletes, the current generator code neglects to send MSG_DELETED to the client side unless some delete verbosity is enabled. With this new version on the generator side, the logfile will now mention deletes, even if the sending (client) side is an older rsync. Fixes bug 10182. --- diff --git a/log.c b/log.c index b1ed320d..8e57b253 100644 --- a/log.c +++ b/log.c @@ -846,13 +846,13 @@ void log_delete(const char *fname, int mode) x.file.mode = mode; - if (!INFO_GTE(DEL, 1) && !stdout_format) - ; - else if (am_server && protocol_version >= 29 && len < MAXPATHLEN) { + if (am_server && protocol_version >= 29 && len < MAXPATHLEN) { if (S_ISDIR(mode)) len++; /* directories include trailing null */ send_msg(MSG_DELETED, fname, len, am_generator); - } else { + } else if (!INFO_GTE(DEL, 1) && !stdout_format) + ; + else { fmt = stdout_format_has_o_or_i ? stdout_format : "deleting %n"; log_formatted(FCLIENT, fmt, "del.", &x.file, fname, ITEM_DELETED, NULL); }