diff --git a/Lib/zipfile/__init__.py b/Lib/zipfile/__init__.py index cc08f602fe44e0..a93ea8901269e4 100644 --- a/Lib/zipfile/__init__.py +++ b/Lib/zipfile/__init__.py @@ -605,7 +605,7 @@ def from_file(cls, filename, arcname=None, *, strict_timestamps=True): def is_dir(self): """Return True if this archive member is a directory.""" - return self.filename.endswith('/') + return self.filename.endswith('/') or self.filename.endswith('\\') # ZIP encryption uses the CRC32 one-byte primitive for scrambling some diff --git a/Misc/NEWS.d/next/Core and Builtins/2024-03-20-15-54-25.gh-issue-117084.uj1NbR.rst b/Misc/NEWS.d/next/Core and Builtins/2024-03-20-15-54-25.gh-issue-117084.uj1NbR.rst new file mode 100644 index 00000000000000..58780b19259118 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2024-03-20-15-54-25.gh-issue-117084.uj1NbR.rst @@ -0,0 +1 @@ +Fix extraction of zip files created on Windows