Skip to content

Commit

Permalink
Patch #1412872: zipfile: use correct system type on unixy systems.
Browse files Browse the repository at this point in the history
  • Loading branch information
loewis committed Feb 5, 2006
1 parent 55cd82f commit 0075690
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Lib/zipfile.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"Read and write ZIP files."

import struct, os, time
import struct, os, time, sys
import binascii

try:
Expand Down Expand Up @@ -131,7 +131,11 @@ def __init__(self, filename="NoName", date_time=(1980,1,1,0,0,0)):
self.compress_type = ZIP_STORED # Type of compression for the file
self.comment = "" # Comment for each file
self.extra = "" # ZIP extra data
self.create_system = 0 # System which created ZIP archive
if sys.platform == 'win32':
self.create_system = 0 # System which created ZIP archive
else:
# Assume everything else is unix-y
self.create_system = 3 # System which created ZIP archive
self.create_version = 20 # Version which created ZIP archive
self.extract_version = 20 # Version needed to extract archive
self.reserved = 0 # Must be zero
Expand Down
3 changes: 3 additions & 0 deletions Misc/NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,9 @@ Extension Modules
Library
-------

- Patch #1412872: zipfile now sets the creator system to 3 (Unix)
unless the system is Win32.

- Patch #1349118: urllib now supports user:pass@ style proxy
specifications, raises IOErrors when proxies for unsupported protocols
are defined, and uses the https proxy on https redirections.
Expand Down

0 comments on commit 0075690

Please sign in to comment.