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:
|
||||
self.path_to_html_toc, self.html_toc_fragment = \
|
||||
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)
|
||||
except:
|
||||
pass
|
||||
|
Loading…
x
Reference in New Issue
Block a user