summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2022-12-26 23:44:40 +0200
committerSergey Poznyakoff <gray@gnu.org>2022-12-26 23:46:15 +0200
commite89c7a45eba7644693870b613386baa45d624e6a (patch)
tree4aeff4df97aa2cb394acf63860343e3fdb26cdd5
parent24c830696527566742f1c8cac70d53086afca599 (diff)
downloadtar-e89c7a45eba7644693870b613386baa45d624e6a.tar.gz
Fix savannah bug #63567
* src/buffer.c (short_read): Increase records_read only if a full record has been read.
-rw-r--r--src/buffer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 4edaef0b..1eb9dae8 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -982,7 +982,8 @@ short_read (size_t status)
}
record_end = record_start + (record_size - left) / BLOCKSIZE;
- records_read++;
+ if (left == 0)
+ records_read++;
}
/* Flush the current buffer to/from the archive. */