tar: fix handling of tarballs with symlinks with size field != 0

This commit is contained in:
Denis Vlasenko
2008-07-20 17:10:43 +00:00
parent b9bbc40f64
commit adc772a5f2
3 changed files with 41 additions and 7 deletions

View File

@@ -8,7 +8,9 @@
void FAST_FUNC seek_by_jump(const archive_handle_t *archive_handle, unsigned amount)
{
if (lseek(archive_handle->src_fd, (off_t) amount, SEEK_CUR) == (off_t) -1) {
if (amount
&& lseek(archive_handle->src_fd, (off_t) amount, SEEK_CUR) == (off_t) -1
) {
if (errno == ESPIPE)
seek_by_read(archive_handle, amount);
else