Skip to content

Commit

Permalink
fix: remove trailit slash when loading packages files from a database
Browse files Browse the repository at this point in the history
  • Loading branch information
arcan1s committed Aug 14, 2024
1 parent 6f30c68 commit 88ee300
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ahriman/core/alpm/pacman.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,9 @@ def extract(tar: tarfile.TarFile) -> Generator[tuple[str, set[str]], None, None]
content = tar.extractfile(descriptor)
if content is None:
continue
files = {filename.decode("utf8").rstrip() for filename in content.readlines()}
# this is just array of files, however, the directories are with trailing slash,
# which previously has been removed by the conversion to ``pathlib.Path``
files = {filename.decode("utf8").rstrip().removesuffix("/") for filename in content.readlines()}

yield package, files

Expand Down

0 comments on commit 88ee300

Please sign in to comment.