Browse Source

Show true delete in dryrun

master
Raphael Roberts 5 years ago
parent
commit
78cc244955
  1. 3
      openwrt_backup/__init__.py

3
openwrt_backup/__init__.py

@ -14,6 +14,9 @@ from openwrt_backup.prune import get_all_but_last_n
def do_prune(dest_path: Path, n: int, dry, hostname=None):
if dry:
to_delete = get_all_but_last_n(dest_path, n - 1, hostname)
else:
to_delete = get_all_but_last_n(dest_path, n, hostname)
for f in to_delete:
if dry:

Loading…
Cancel
Save