Tar module issue

chaica lordchaica at free.fr
Mon Feb 7 12:40:02 EST 2005


Thx for your response.
The fact is that I use tar.close() at the end of my code. This is really
a random behaviour cause with an archive which has a short directory
tree, I don't have this kind of beahavior and the archive works.

thx


On Mon, 2005-02-07 at 13:01 +0000, Russell Bungay wrote:
> Hello,
> 
> > I'm using tarfile module to create an archive. For my example I'm using
> > Amsn file and directory tree.
> > My variables are like these ones: 
> > path = /home/chaica/downloads/amsn-0_94/skins/Tux/smileys/shades.gif
> > fileName = amsn-0_94/skins/Tux/smileys/shades.gif
> > tar.add( path, fileName )
> > and while untaring my archive with tar jxvf I've random errors :
> > tar: amsn-0_94/lang/genlangfiles.c: Cannot hard link to
> > `amsn-0_94/lang/genlangfiles.c': No such file or directory
> > I checked google and saw that errors like these ones could occur when
> > you use global path while taring, but I'm not, using fileName which is
> > local. 
> 
> I used tarfile for the first time at the weekend and noticed one thing 
> that may help.  I don't know if it is a specific solution to your 
> problem, but it might be worth a try.
> 
> I noticed that if I didn't explicitly close the tarfile with tar.close() 
> after I had added the files, the resultant file would sometimes not be 
> written properly (even with completed execution of the whole script). 
> Explicitly closing the file would make these problems go away.
> 
> I hope that helps,
> 
> R
-- 
chaica <lordchaica at free.fr>




More information about the Python-list mailing list