Skip to content

Commit 0d63e3a

Browse files
committed
gh-153529: Fix zipfile.Path.is_symlink() on archive root
1 parent c22e9c9 commit 0d63e3a

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Lib/zipfile/_path/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,9 @@ def is_symlink(self):
414414
"""
415415
Return whether this path is a symlink.
416416
"""
417+
if not self.at:
418+
return False
419+
417420
info = self.root.getinfo(self.at)
418421
mode = info.external_attr >> 16
419422
return stat.S_ISLNK(mode)

0 commit comments

Comments
 (0)