mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-23 21:24:44 +01:00
Validate pathtoebook
This commit is contained in:
parent
74d97ca869
commit
f1db7eab2f
1 changed files with 3 additions and 1 deletions
|
|
@ -27,7 +27,9 @@ def create_open_book(container, book):
|
|||
for entry in rl:
|
||||
if book and book.manifest.pathtoebook is entry.pathtoebook:
|
||||
continue
|
||||
fname = str.replace(entry.pathtoebook, '\\', '/')
|
||||
if jstype(entry.pathtoebook) is not 'string':
|
||||
continue
|
||||
fname = entry.pathtoebook.replace(/\\/g, '/')
|
||||
if '/' in fname:
|
||||
fname = fname.rpartition('/')[-1]
|
||||
items.push(create_item(entry.title, ui_operations.ask_for_open.bind(None, entry.pathtoebook), fname))
|
||||
|
|
|
|||
Loading…
Reference in a new issue