svn commit: r190517 - stable/7/usr.bin/tar
Tim Kientzle
kientzle at FreeBSD.org
Sat Mar 28 18:04:14 PDT 2009
Author: kientzle
Date: Sun Mar 29 01:04:13 2009
New Revision: 190517
URL: http://svn.freebsd.org/changeset/base/190517
Log:
Merge r188343 from -CURRENT: Unbreak writing shar archives.
When copying file data to the archive, don't write more
than was read. This seems to have only affected the shar
writer, since other formats proactively truncate output
to the originally-advertised size.
PR: bin/131244
Approved by: re (Ken Smith)
Modified:
stable/7/usr.bin/tar/ (props changed)
stable/7/usr.bin/tar/write.c
Modified: stable/7/usr.bin/tar/write.c
==============================================================================
--- stable/7/usr.bin/tar/write.c Sun Mar 29 01:00:48 2009 (r190516)
+++ stable/7/usr.bin/tar/write.c Sun Mar 29 01:04:13 2009 (r190517)
@@ -966,7 +966,7 @@ write_file_data(struct bsdtar *bsdtar, s
siginfo_printinfo(bsdtar, progress);
bytes_written = archive_write_data(a, bsdtar->buff,
- FILEDATABUFLEN);
+ bytes_read);
if (bytes_written < 0) {
/* Write failed; this is bad */
bsdtar_warnc(bsdtar, 0, "%s", archive_error_string(a));
More information about the svn-src-stable
mailing list