[Patches] [ python-Patches-1412872 ] zipfile: use correct system type on unixy systems
SourceForge.net
noreply at sourceforge.net
Thu Jan 26 17:49:41 CET 2006
Patches item #1412872, was opened at 2006-01-23 14:48
Message generated for change (Comment added) made by pete_forman
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1412872&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Library (Lib)
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Submitted By: Ronald Oussoren (ronaldoussoren)
Assigned to: Nobody/Anonymous (nobody)
Summary: zipfile: use correct system type on unixy systems
Initial Comment:
This patch updates the contructor of zipfile.ZipInfo to initialize the
create_system attribute to 3 instead of 0 on systems that are not
Windows.
Without this patch the unzip command won't honour the file mode that is
stored in the zip file.
----------------------------------------------------------------------
Comment By: Pete Forman (pete_forman)
Date: 2006-01-26 16:49
Message:
Logged In: YES
user_id=315964
The merged patch looks good.
One extra comment that I'd made was that if os.name is
'java' then a further query of
java.lang.System.getProperty("os.name") might be in order.
The string returned from that is 'Linux', 'Windows XP' and
'SunOS' on the platforms I can test. A quick search turned
up this page: http://lopica.sourceforge.net/os.html
On that basis I'd propose a rule that if the Java os.name
starts with 'Windows' or 'OS/2' then use 0; if it starts
with 'Mac OS' then 7; else 3. Perhaps someone with 'Mac OS
X' could pronounce whether it ought to be 3 (UNIX) or 7
(Macintosh). Comments from Jython experts welcome as well.
The spec for the ZIP file format is at PKWARE.
http://www.pkware.com/business_and_developers/developer/
popups/appnote.txt
----------------------------------------------------------------------
Comment By: Ronald Oussoren (ronaldoussoren)
Date: 2006-01-26 10:34
Message:
Logged In: YES
user_id=580910
I've updated the patch based on a simular patch by Pete Forman (UID:
pete_forman). This version contains a lookup-table of create_systems based on
the os.name and also supports some other non-windows systems.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1412872&group_id=5470
More information about the Patches
mailing list