Skip to content

Commit e11f917

Browse files
committed
Don't render directory entries from zips
Some packages (e.g. dumb-init's wheels) have entries in the zip file for directories for some reason, even though almost all zips and wheels I've looked at don't.
1 parent 2c016e9 commit e11f917

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pypi_browser/packaging.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def _package_entries_from_zipfile(path: str) -> typing.Set[PackageEntry]:
4646
mode=stat.filemode(entry.external_attr >> 16),
4747
)
4848
for entry in zf.infolist()
49+
if not entry.is_dir()
4950
}
5051

5152

0 commit comments

Comments
 (0)