mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #2447 (Calibre "permission denied" error)
This commit is contained in:
parent
312a23fd8e
commit
a4dc51b30d
@ -506,6 +506,9 @@ class OPF(object):
|
|||||||
else:
|
else:
|
||||||
self.path_to_html_toc, self.html_toc_fragment = \
|
self.path_to_html_toc, self.html_toc_fragment = \
|
||||||
toc.partition('#')[0], toc.partition('#')[-1]
|
toc.partition('#')[0], toc.partition('#')[-1]
|
||||||
|
if not os.access(self.path_to_html_toc, os.R_OK) or \
|
||||||
|
not os.path.isfile(self.path_to_html_toc):
|
||||||
|
self.path_to_html_toc = None
|
||||||
self.toc.read_html_toc(toc)
|
self.toc.read_html_toc(toc)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
Loading…
x
Reference in New Issue
Block a user