Skip to content

Commit

Permalink
Parse the top levels in a case-sensitive manner
Browse files Browse the repository at this point in the history
Signed-off-by: Xiaochao Dong (@damnever) <the.xcdong@gmail.com>
  • Loading branch information
damnever committed Mar 7, 2024
1 parent 91458b4 commit 9503d9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pigar/unpack.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,12 @@ def parse_top_levels(file: InMemoryOrDiskFile) -> List[str]:
top_level_file = None
top_level_dirs = []
for name in archive.names:
basename = os.path.basename(name.lower())
basename = os.path.basename(name)
if basename == 'top_level.txt':
top_level_file = name
break
if basename == '__init__.py':
dir = os.path.dirname(name.lower())
dir = os.path.dirname(name)
if '' == os.path.dirname(dir): # Root.
top_level_dirs.append(dir)
if top_level_file is None:
Expand Down

0 comments on commit 9503d9a

Please sign in to comment.