New submission from Thomas Sondergaard <tho...@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.

[...@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 <rep...@bugs.python.org>
<http://bugs.python.org/issue9835>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to