[ python-Bugs-1031148 ] tarfile: dirsize is not zero

SourceForge.net noreply at sourceforge.net
Tue Sep 21 21:03:42 CEST 2004


Bugs item #1031148, was opened at 2004-09-20 13:10
Message generated for change (Comment added) made by loewis
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1031148&group_id=5470

Category: Extension Modules
Group: Python 2.3
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Bertram Scharpf (bertramscharpf)
Assigned to: Nobody/Anonymous (nobody)
Summary: tarfile: dirsize is not zero

Initial Comment:
Tarring a directory (only a directory, not its contents) 
with the tar program results in 
 
user at host:~$ mkdir tmp 
user at host:~$ tar --no-recursion -cf sample.tar tmp/ 
user at host:~$ tar tfv sample.tar  
drwxr-xr-x user/user 0 2004-09-20 12:55:27 tmp/ 
 
Using the Python `tarfile' module, the result is 
 
user at host:~$ python 
... 
>>> t = tarfile.open( 'sample.tar', 'w') 
>>> t.add( 'tmp', recursive = False) 
... 
user at host:~$ tar tfv sample.tar  
drwxr-xr-x user/user 4096 2004-09-20 12:55:27 tmp/ 
 
But there are no 4096 Bytes in the tar file. If this 
is not actually a bug, I would like to propose it to 
be one. 
 
I may provide a solution to this at 
<http://www.bertram-scharpf.de/tmp/tarfile.tar.gz> 
 
Bertram 

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

>Comment By: Martin v. Löwis (loewis)
Date: 2004-09-21 21:03

Message:
Logged In: YES 
user_id=21627

This was fixed in tarfile.py 1.16

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

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


More information about the Python-bugs-list mailing list