From 4fbb584a0e6ee086d6b30936c7124c687b3e977f Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Fri, 24 Nov 2006 14:55:23 +0000 Subject: tar: cry murder and bail out if file shrinks under us while we tar it up --- libbb/copyfd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'libbb/copyfd.c') diff --git a/libbb/copyfd.c b/libbb/copyfd.c index 87126eb72..601c51ce4 100644 --- a/libbb/copyfd.c +++ b/libbb/copyfd.c @@ -46,8 +46,7 @@ static off_t bb_full_fd_action(int src_fd, int dst_fd, off_t size) } else if (rd < 0) { bb_perror_msg(bb_msg_read_error); break; - } else if (rd == 0) { - /* All done. */ + } else { /* eof - all done. */ status = 0; break; } -- cgit v1.2.3