From 278a8945a668348b1e0b31b6ee7c718909db20b2 Mon Sep 17 00:00:00 2001 From: uid65697 Date: Thu, 25 Dec 2003 10:18:14 +0000 Subject: [PATCH] (short_read): Issue a warning on short reads. --- src/buffer.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/buffer.c b/src/buffer.c index b735dca..515c3b9 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -623,8 +623,15 @@ short_read (ssize_t status) archive_read_error (); if (status == 0) - break; - + { + char buf[UINTMAX_STRSIZE_BOUND]; + + WARN((0, 0, _("Read %s bytes from %s"), + STRINGIFY_BIGINT (record_size - left, buf), + *archive_name_cursor)); + break; + } + if (! read_full_records_option) { unsigned long rest = record_size - left; -- 2.44.0