X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/16cc9ca2c956dc62f5312760cb420bf55d85364a..e2bc4126691bdbc8ab78e6e56c72bf1d8bc51168:/receiver.c diff --git a/receiver.c b/receiver.c index fab410b5..1fe97335 100644 --- a/receiver.c +++ b/receiver.c @@ -552,22 +552,31 @@ int recv_files(int f_in, struct file_list *flist, char *local_name) cleanup_disable(); if (!recv_ok) { - if (csum_length == SUM_LENGTH) { - rprintf(FERROR,"ERROR: file corruption in %s. File changed during transfer?\n", - full_fname(fname)); - } else { + int msgtype; + char *redostr; + if (csum_length != SUM_LENGTH) { char buf[4]; - if (verbose > 1) - rprintf(FINFO,"redoing %s(%d)\n",fname,i); SIVAL(buf, 0, i); send_msg(MSG_REDO, buf, 4); + msgtype = read_batch ? FERROR : FINFO; + redostr = read_batch ? " Redo doubtful." + : " Redo pending."; + } else { + msgtype = FERROR; + redostr = ""; + } + if (verbose || read_batch) { + rprintf(msgtype, + "%s: %s failed verification. Update %sed.%s\n", + msgtype == FERROR ? "ERROR" : "WARNING", + fname, keep_partial || inplace ? + "retain" : "discard", redostr); } } } make_backups = save_make_backups; - if (delete_after && recurse && delete_mode && !local_name - && flist->count > 0) + if (delete_after && recurse && !local_name && flist->count > 0) delete_files(flist); if (verbose > 2)