summaryrefslogtreecommitdiff
path: root/Lib/zipfile.py
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2006-02-05 17:09:41 +0000
committerMartin v. Löwis <martin@v.loewis.de>2006-02-05 17:09:41 +0000
commit85d1df99ed0bbf9c368a0ab0e02d7ae3ab1b79f1 (patch)
tree9c49f6266ddb21c6890d444b87202434c0850d71 /Lib/zipfile.py
parent36ba01aaef3007e44920c9bc181fc65013fb4ca1 (diff)
downloadcpython-85d1df99ed0bbf9c368a0ab0e02d7ae3ab1b79f1.tar.gz
Patch #1412872: zipfile: use correct system type on unixy systems.
Diffstat (limited to 'Lib/zipfile.py')
-rw-r--r--Lib/zipfile.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/zipfile.py b/Lib/zipfile.py
index 93436cf8b3..037843c86d 100644
--- a/Lib/zipfile.py
+++ b/Lib/zipfile.py
@@ -1,6 +1,6 @@
"Read and write ZIP files."
-import struct, os, time
+import struct, os, time, sys
import binascii
try:
@@ -131,7 +131,11 @@ class ZipInfo:
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