tar: cry murder and bail out if file shrinks under us while we tar it up

This commit is contained in:
Denis Vlasenko
2006-11-24 14:55:23 +00:00
parent 0b35470d9b
commit 4fbb584a0e
2 changed files with 13 additions and 4 deletions

View File

@@ -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;
}