bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-tar] Interchange issue with archive containing sparse file


From: Sergey Poznyakoff
Subject: Re: [Bug-tar] Interchange issue with archive containing sparse file
Date: Sun, 06 Feb 2011 11:13:52 +0200

address@hidden ha escrit:

> There seems to be an interchange problem between star and GNU tar,
> possibly related to sparse file support. Or perhaps this is just a bug in
> GNU tar?

It looks so, indeed.  Please apply the attached patch.

Regards,
Sergey

>From 52e4006683ab7ef7c1797e2297e51753de034449 Mon Sep 17 00:00:00 2001
From: Sergey Poznyakoff <address@hidden>
Date: Sun, 6 Feb 2011 11:12:19 +0200
Subject: [PATCH] Fix compatibility with xustar sparse headers.

* src/sparse.c (star_get_sparse_info): Update file->dumped_size.
---
 src/sparse.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/sparse.c b/src/sparse.c
index 4b2f982..d66981b 100644
--- a/src/sparse.c
+++ b/src/sparse.c
@@ -811,6 +811,7 @@ star_get_sparse_info (struct tar_sparse_file *file)
       set_next_block_after (h);
       for (i = 0; i < SPARSES_IN_STAR_EXT_HEADER && rc == add_ok; i++)
        rc = oldgnu_add_sparse (file, &h->star_ext_header.sp[i]);
+      file->dumped_size += BLOCKSIZE;
     }
 
   if (rc == add_fail)
-- 
1.7.3.2


reply via email to

[Prev in Thread] Current Thread [Next in Thread]