diff options
Diffstat (limited to 'Lib/zipfile')
-rw-r--r-- | Lib/zipfile/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/zipfile/__init__.py b/Lib/zipfile/__init__.py index fe629ed..1c415a2 100644 --- a/Lib/zipfile/__init__.py +++ b/Lib/zipfile/__init__.py @@ -1772,7 +1772,7 @@ class ZipFile: # filter illegal characters on Windows arcname = self._sanitize_windows_name(arcname, os.path.sep) - if not arcname: + if not arcname and not member.is_dir(): raise ValueError("Empty filename.") targetpath = os.path.join(targetpath, arcname) |