[New-bugs-announce] [issue9835] ZipFile unix external attributes incorrect for entry written with writestr

Thomas Sondergaard report at bugs.python.org
Sat Sep 11 14:12:00 CEST 2010


New submission from Thomas Sondergaard <thomas at sondergaard.cc>:

For entries written with writestr ZipFile doesn't record the file type in the unix external attributes block. It should set it to "regular file" (S_IFREG).

The attached sample creates a zip file. If you inspect it with zipinfo -v, you will see that the unix file type is not correct for the entry stored with writestr.

[ts at roadrunner ~]$ zipinfo -v test.zip |grep "Unix file attributes"
  Unix file attributes (000600 octal):              ?rw-------
  Unix file attributes (100664 octal):              -rw-rw-r--

----------
components: Library (Lib)
files: test.py
messages: 116093
nosy: Thomas.Sondergaard
priority: normal
severity: normal
status: open
title: ZipFile unix external attributes incorrect for entry written with writestr
type: behavior
Added file: http://bugs.python.org/file18846/test.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9835>
_______________________________________


More information about the New-bugs-announce mailing list