Skip to content

Commit

Permalink
Fix keep file parsing for packages with an underscore.
Browse files Browse the repository at this point in the history
Closes #7

Signed-off-by: gcarq <[email protected]>
  • Loading branch information
gcarq committed Mar 13, 2024
1 parent 8d4898f commit c157dba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lostfiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ def resolve_pkg_from_keepfile(filename: str) -> str:
Returns the package atom from the given .keep file,
for example: .keep_net-print_cups-0 -> net-print/cups
"""
_, category, remainder = filename.split("_")
_, category, remainder = filename.split("_", maxsplit=2)
package, _ = remainder.rsplit("-", maxsplit=1)
return f"{category}/{package}"

Expand Down

0 comments on commit c157dba

Please sign in to comment.