mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #2104281 [Error: Unhandled exception when deleting entries](https://bugs.launchpad.net/calibre/+bug/2104281)
This commit is contained in:
parent
e4da8e2172
commit
967027a22d
@ -84,7 +84,10 @@ def set_html(mi, html, text_browser):
|
|||||||
search_paths = []
|
search_paths = []
|
||||||
db, _ = db_for_mi(mi)
|
db, _ = db_for_mi(mi)
|
||||||
if db and book_id is not None:
|
if db and book_id is not None:
|
||||||
|
try:
|
||||||
path = db.abspath(book_id, index_is_id=True)
|
path = db.abspath(book_id, index_is_id=True)
|
||||||
|
except Exception: # deleted book
|
||||||
|
path = ''
|
||||||
if path:
|
if path:
|
||||||
search_paths = [path]
|
search_paths = [path]
|
||||||
text_browser.setSearchPaths(search_paths)
|
text_browser.setSearchPaths(search_paths)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user