mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Validate pathtoebook
This commit is contained in:
parent
74d97ca869
commit
f1db7eab2f
@ -27,7 +27,9 @@ def create_open_book(container, book):
|
|||||||
for entry in rl:
|
for entry in rl:
|
||||||
if book and book.manifest.pathtoebook is entry.pathtoebook:
|
if book and book.manifest.pathtoebook is entry.pathtoebook:
|
||||||
continue
|
continue
|
||||||
fname = str.replace(entry.pathtoebook, '\\', '/')
|
if jstype(entry.pathtoebook) is not 'string':
|
||||||
|
continue
|
||||||
|
fname = entry.pathtoebook.replace(/\\/g, '/')
|
||||||
if '/' in fname:
|
if '/' in fname:
|
||||||
fname = fname.rpartition('/')[-1]
|
fname = fname.rpartition('/')[-1]
|
||||||
items.push(create_item(entry.title, ui_operations.ask_for_open.bind(None, entry.pathtoebook), fname))
|
items.push(create_item(entry.title, ui_operations.ask_for_open.bind(None, entry.pathtoebook), fname))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user