Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tarfile: dirsize is not zero #40932

Closed
bertramscharpf mannequin opened this issue Sep 20, 2004 · 2 comments
Closed

tarfile: dirsize is not zero #40932

bertramscharpf mannequin opened this issue Sep 20, 2004 · 2 comments
Labels
extension-modules C modules in the Modules dir

Comments

@bertramscharpf
Copy link
Mannequin

bertramscharpf mannequin commented Sep 20, 2004

BPO 1031148
Nosy @loewis

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2004-09-21.19:03:42.000>
created_at = <Date 2004-09-20.11:10:51.000>
labels = ['extension-modules']
title = 'tarfile: dirsize is not zero'
updated_at = <Date 2004-09-21.19:03:42.000>
user = 'https://bugs.python.org/bertramscharpf'

bugs.python.org fields:

activity = <Date 2004-09-21.19:03:42.000>
actor = 'loewis'
assignee = 'none'
closed = True
closed_date = None
closer = None
components = ['Extension Modules']
creation = <Date 2004-09-20.11:10:51.000>
creator = 'bertramscharpf'
dependencies = []
files = []
hgrepos = []
issue_num = 1031148
keywords = []
message_count = 2.0
messages = ['22499', '22500']
nosy_count = 2.0
nosy_names = ['loewis', 'bertramscharpf']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue1031148'
versions = ['Python 2.3']

@bertramscharpf
Copy link
Mannequin Author

bertramscharpf mannequin commented Sep 20, 2004

Tarring a directory (only a directory, not its contents) 
with the tar program results in 
 
user@host:~$ mkdir tmp 
user@host:~$ tar --no-recursion -cf sample.tar tmp/ 
user@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@host:~$ python 
... 
>>> t = tarfile.open( 'sample.tar', 'w') 
>>> t.add( 'tmp', recursive = False) 
... 
user@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

@bertramscharpf bertramscharpf mannequin closed this as completed Sep 20, 2004
@bertramscharpf bertramscharpf mannequin added the extension-modules C modules in the Modules dir label Sep 20, 2004
@bertramscharpf bertramscharpf mannequin closed this as completed Sep 20, 2004
@bertramscharpf bertramscharpf mannequin added the extension-modules C modules in the Modules dir label Sep 20, 2004
@loewis
Copy link
Mannequin

loewis mannequin commented Sep 21, 2004

Logged In: YES
user_id=21627

This was fixed in tarfile.py 1.16

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extension-modules C modules in the Modules dir
Projects
None yet
Development

No branches or pull requests

0 participants