Skip to content

Commit

Permalink
pythongh-117084: Fix zip extraction bug
Browse files Browse the repository at this point in the history
On Windows a directory is ending in \\ and not /.
  • Loading branch information
fliiiix authored Mar 20, 2024
1 parent 44fbab4 commit 7914efe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Lib/zipfile/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7914efe

Please sign in to comment.