Date: Sun, 8 Feb 2009 22:02:46 +0000 (UTC) From: Tim Kientzle <kientzle@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r188343 - head/usr.bin/tar Message-ID: <200902082202.n18M2kQ3035843@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kientzle Date: Sun Feb 8 22:02:46 2009 New Revision: 188343 URL: http://svn.freebsd.org/changeset/base/188343 Log: 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 MFC after: 7 days Modified: head/usr.bin/tar/write.c Modified: head/usr.bin/tar/write.c ============================================================================== --- head/usr.bin/tar/write.c Sun Feb 8 22:01:20 2009 (r188342) +++ head/usr.bin/tar/write.c Sun Feb 8 22:02:46 2009 (r188343) @@ -972,7 +972,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));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902082202.n18M2kQ3035843>