Patch #995126: Correct directory size, and generate GNU tarfiles by default.

This commit is contained in:
Martin v. Löwis 2004-08-18 13:57:44 +00:00
parent 78a8acc55b
commit 75b9da4aaf
3 changed files with 6 additions and 3 deletions

View file

@ -781,7 +781,7 @@ class TarFile(object):
# messages (if debug >= 0). If > 0, errors
# are passed to the caller as exceptions.
posix = True # If True, generates POSIX.1-1990-compliant
posix = False # If True, generates POSIX.1-1990-compliant
# archives (no GNU extensions!)
fileobject = ExFileObject
@ -1137,7 +1137,7 @@ class TarFile(object):
tarinfo.mode = stmd
tarinfo.uid = statres.st_uid
tarinfo.gid = statres.st_gid
tarinfo.size = statres.st_size
tarinfo.size = not stat.S_ISDIR(stmd) and statres.st_size or 0
tarinfo.mtime = statres.st_mtime
tarinfo.type = type
tarinfo.linkname = linkname