From d0a8a0d31243f2ac798531ced2cca45ddf1fea42 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sat, 26 Jun 2010 18:11:44 +0200 Subject: tar: fix --to-command wrt short writes function old new delta bb_copyfd_exact_size 51 98 +47 bb_full_fd_action 362 394 +32 get_header_tar 1546 1558 +12 data_extract_to_command 430 439 +9 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 4/0 up/down: 100/0) Total: 100 bytes Signed-off-by: Denys Vlasenko --- archival/libunarchive/data_extract_to_command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'archival') diff --git a/archival/libunarchive/data_extract_to_command.c b/archival/libunarchive/data_extract_to_command.c index 983c5301d..53a7217c2 100644 --- a/archival/libunarchive/data_extract_to_command.c +++ b/archival/libunarchive/data_extract_to_command.c @@ -108,7 +108,7 @@ void FAST_FUNC data_extract_to_command(archive_handle_t *archive_handle) close(p[0]); /* Our caller is expected to do signal(SIGPIPE, SIG_IGN) * so that we don't die if child don't read all the input: */ - bb_copyfd_exact_size(archive_handle->src_fd, p[1], file_header->size); + bb_copyfd_exact_size(archive_handle->src_fd, p[1], -file_header->size); close(p[1]); if (safe_waitpid(pid, &status, 0) == -1) -- cgit v1.2.3