Fixes data corruption by the --sparse option --- cpio-2.4.2/util.c.orig Tue Jan 16 22:40:14 1996 +++ cpio-2.4.2/util.c Tue Jul 31 20:07:15 2001 @@ -1307,13 +1307,11 @@ break; } + lseek_rc = lseek (fildes, delayed_seek_count, SEEK_CUR); + delayed_seek_count = 0; + if (leftover_bytes_count != 0) { - if (delayed_seek_count != 0) - { - lseek_rc = lseek (fildes, delayed_seek_count, SEEK_CUR); - delayed_seek_count = 0; - } write_rc = write (fildes, buf, leftover_bytes_count); } return nbyte;