X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/afc65a5acffdf2a3e8c4b35b4d8ace3aa42773bc..1c3e3679ef47ba10641d12212311663dd9b3097a:/log.c diff --git a/log.c b/log.c index 652bc06a..b45fd8d5 100644 --- a/log.c +++ b/log.c @@ -521,6 +521,18 @@ void log_item(struct file_struct *file, struct stats *initial_stats, } } +void maybe_log_item(struct file_struct *file, int iflags, int itemizing, + char *buf) +{ + int see_item = itemizing && (iflags || verbose > 1); + if (am_server) { + if (am_daemon && !dry_run && see_item) + log_item(file, &stats, iflags, buf); + } else if (see_item || iflags & ITEM_UPDATING || *buf + || (S_ISDIR(file->mode) && iflags & ITEM_REPORT_TIME)) + log_item(file, &stats, iflags, buf); +} + void log_delete(char *fname, int mode) { static struct file_struct file;