mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
calibredb check_library: Do not create empty library if user specifies incorrect path
This commit is contained in:
parent
49ba0a991b
commit
dd01e7448f
@ -1211,6 +1211,10 @@ def command_check_library(args, dbpath):
|
||||
for i in list:
|
||||
print ' %-40.40s - %-40.40s'%(i[0], i[1])
|
||||
|
||||
if not LibraryDatabase.exists_at(dbpath):
|
||||
prints('No library found at', dbpath, file=sys.stderr)
|
||||
raise SystemExit(1)
|
||||
|
||||
db = LibraryDatabase(dbpath)
|
||||
checker = CheckLibrary(dbpath, db)
|
||||
checker.scan_library(names, exts)
|
||||
|
Loading…
x
Reference in New Issue
Block a user