fix: remove trailit slash when loading packages files from a database

This commit is contained in:
Evgenii Alekseev 2024-08-08 14:53:25 +03:00
parent 6f30c687c2
commit 88ee300b9e

View File

@ -197,7 +197,9 @@ class Pacman(LazyLogging):
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