mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
9efcc37f16
commit
f6517cc818
@ -114,7 +114,7 @@ class TXTInput(InputFormatPlugin):
|
||||
for img in root.xpath('//img[@src]'):
|
||||
src = img.get('src')
|
||||
prefix = src.split(':', 1)[0].lower()
|
||||
if prefix not in ('file', 'http', 'https', 'ftp') and not os.path.isabs(src):
|
||||
if src and prefix not in ('file', 'http', 'https', 'ftp') and not os.path.isabs(src):
|
||||
src = os.path.join(base_dir, src)
|
||||
if os.path.isfile(src) and os.access(src, os.R_OK):
|
||||
with open(src, 'rb') as f:
|
||||
|
Loading…
x
Reference in New Issue
Block a user