Skip to content

Commit

Permalink
fix: don't cleanup backups with similar prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
malhussan committed Aug 10, 2023
1 parent 141d884 commit d5e92d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/swift.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def upload(path, token, container_url):


def cleanup(path, token, container_url, keep):
prefix = ".".join(path.split(".")[0:-3])
prefix = ".".join(path.split(".")[0:-3]) + "."
backups = get_objects(container_url, token)
backups = sorted(b for b in backups if b.startswith(prefix))

Expand Down

0 comments on commit d5e92d3

Please sign in to comment.