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

Commit c248873

Browse files
author
Serene-Arc
committed
Fix some bugs
1 parent 98b126e commit c248873

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bak/commands/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,8 @@ def bak_down_cmd(filename: Path,
253253
return
254254
elif not bakfile_entry:
255255
return
256+
if not destination:
257+
destination = bakfile_entry.orig_abspath
256258

257259
if quiet:
258260
confirm = 'y'
@@ -265,10 +267,8 @@ def bak_down_cmd(filename: Path,
265267
if confirm.lower()[0] != 'y':
266268
console.print("Cancelled.")
267269
return
268-
if not destination:
269-
destination = bakfile_entry.orig_abspath
270270
if not keep_bakfile:
271-
bakfile_entry.bakfile_loc.rename(destination)
271+
Path(bakfile_entry.bakfile_loc).rename(destination)
272272
for entry in bakfile_entries:
273273
Path(entry.bakfile_loc).unlink(missing_ok=True)
274274
db_handler.del_bakfile_entry(entry)

0 commit comments

Comments
 (0)