mirror of
https://github.com/beetbox/beets.git
synced 2025-12-31 13:02:47 +01:00
Merge pull request #3398 from logan-arens/update-1934
"beet update" now confirms that the library path exists before updating.
This commit is contained in:
commit
bf9b43a769
2 changed files with 11 additions and 0 deletions
|
|
@ -1185,6 +1185,12 @@ def update_items(lib, query, album, move, pretend, fields):
|
|||
|
||||
|
||||
def update_func(lib, opts, args):
|
||||
# Verify that the library folder exists to prevent accidental wipes.
|
||||
if not os.path.isdir(lib.directory):
|
||||
ui.print_("Library path is unavailable or does not exist.")
|
||||
ui.print_(lib.directory)
|
||||
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)
|
||||
|
||||
|
|
|
|||
|
|
@ -116,6 +116,11 @@ Fixes:
|
|||
:bug:`3242`
|
||||
* Fix a bug that caused a crash when tagging items with the beatport plugin.
|
||||
:bug:`3374`
|
||||
* ``beet update`` will now confirm that the user still wants to update if
|
||||
their library folder cannot be found, preventing the user from accidentally
|
||||
wiping out their beets database.
|
||||
Thanks to :user:`logan-arens`.
|
||||
:bug:`1934`
|
||||
|
||||
For plugin developers:
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue