"beet update" now confirms that the library path exists before updating.

Fixes #1934.
This commit is contained in:
Logan Arens 2019-10-09 22:47:50 -04:00
parent 61a56f1b51
commit 8700e271d9
No known key found for this signature in database
GPG key ID: 63C23764247D3B54

View file

@ -1185,8 +1185,13 @@ def update_items(lib, query, album, move, pretend, fields):
def update_func(lib, opts, args):
# Verify that the library folder exists. (disk isn't unmounted, for example)
if not os.path.exists(lib.directory):
ui.print_("Library path is unavailable or does not exist.")
if not ui.input_yn("Are you sure you want to continue (y/n)?", True):
return
update_items(lib, decargs(args), opts.album, ui.should_move(opts.move),
opts.pretend, opts.fields)
opts.pretend, opts.fields)
update_cmd = ui.Subcommand(