Skip to content
This repository was archived by the owner on Nov 6, 2025. It is now read-only.

Commit 43817d7

Browse files
author
Serene-Arc
committed
Allow restoring or deleting backups of nonexistent files
1 parent 0d03d49 commit 43817d7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

bak/__main__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def bak_up(filename):
5959
is_flag=True,
6060
default=False,
6161
help="No confirmation prompt")
62-
@click.argument("filename", required=True, type=click.Path(exists=True))
62+
@click.argument("filename", required=True)
6363
def bak_down(filename, keep, quietly):
6464
if not filename:
6565
click.echo("A filename or operation is required.\n"
@@ -73,7 +73,7 @@ def bak_down(filename, keep, quietly):
7373
is_flag=True,
7474
default=False,
7575
help="Delete all related .bakfiles without confirming")
76-
@click.argument("filename", required=True, type=click.Path(exists=True))
76+
@click.argument("filename", required=True)
7777
def bak_off(filename, quietly):
7878
filename = Path(filename).expanduser().resolve()
7979
if not commands.bak_off_cmd(filename, quietly):

bak/commands/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ def bak_off_cmd(filename: Optional[Path],
299299
"""
300300
console = Console()
301301
bakfiles = db_handler.get_bakfile_entries(filename)
302-
if bakfiles is []:
302+
if not bakfiles:
303303
console.print(f"No bakfiles found for {filename}")
304304
return False
305305
confirm = input(

0 commit comments

Comments
 (0)