summaryrefslogtreecommitdiffstats
path: root/Lib/zipfile.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/zipfile.py')
-rw-r--r--Lib/zipfile.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/zipfile.py b/Lib/zipfile.py
index bda6134..11d7cf9 100644
--- a/Lib/zipfile.py
+++ b/Lib/zipfile.py
@@ -1337,7 +1337,9 @@ class ZipFile:
arcname += '/'
zinfo = ZipInfo(arcname, date_time)
zinfo.external_attr = (st[0] & 0xFFFF) << 16 # Unix attributes
- if compress_type is None:
+ if isdir:
+ zinfo.compress_type = ZIP_STORED
+ elif compress_type is None:
zinfo.compress_type = self.compression
else:
zinfo.compress_type = compress_type