[ python-Bugs-1427552 ] tarfile.open bug / corrupt data

SourceForge.net noreply at sourceforge.net
Sat Mar 18 09:26:12 CET 2006


Bugs item #1427552, was opened at 2006-02-08 14:13
Message generated for change (Settings changed) made by gbrandl
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1427552&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Interpreter Core
Group: Python 2.4
>Status: Pending
Resolution: None
Priority: 7
Submitted By: Chris86 (chris86)
Assigned to: Nobody/Anonymous (nobody)
Summary: tarfile.open bug / corrupt data

Initial Comment:
Hi!

I want to create a bz2 compressed tar file.
Here is my code:
full="/home/test/test.sql"
tar = tarfile.open("test.tar.bz2", "w:bz2")
tarinfo = tar.gettarinfo(full,"blubb.sql")
tar.addfile(tarinfo,file(full))
tar.close()

i think this should work, but the sql file is corrupt:
- the created sql file in the compressed tar has only
4745 Lines, the original file has 4753


Regards,
Chris

----------------------------------------------------------------------

Comment By: Neal Norwitz (nnorwitz)
Date: 2006-02-12 06:21

Message:
Logged In: YES 
user_id=33168

Chris can you attach your sql file (or a small test case) so
we can reproduce the problem?

----------------------------------------------------------------------

Comment By: Lars Gustäbel (gustaebel)
Date: 2006-02-08 15:13

Message:
Logged In: YES 
user_id=642936

Just to identify whether this is a tarfile or bz2 module
related issue:
- Do you have the same problem without compression or with
gzip compression?
- Have you tried compressing your sql file directly with the
bz2 module? 

----------------------------------------------------------------------

Comment By: Chris86 (chris86)
Date: 2006-02-08 14:17

Message:
Logged In: YES 
user_id=1133569

same error with Python 2.3.5 (#2, Aug 30 2005, 15:50:26)
[GCC 4.0.2 20050821 (prerelease) (Debian 4.0.1-6)] on linux2


----------------------------------------------------------------------

Comment By: Chris86 (chris86)
Date: 2006-02-08 14:15

Message:
Logged In: YES 
user_id=1133569

I'm using Python 2.4.2 (#2, Nov 20 2005, 17:04:48)
[GCC 4.0.3 20051111 (prerelease) (Debian 4.0.2-4)] on linux2

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1427552&group_id=5470


More information about the Python-bugs-list mailing list