Date: Sun, 29 Mar 2009 01:04:13 +0000 (UTC) From: Tim Kientzle <kientzle@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r190517 - stable/7/usr.bin/tar Message-ID: <200903290104.n2T14D7g017754@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903290104.n2T14D7g017754>