mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-22 07:35:00 +02:00
This commit is contained in:
parent
3553c321fd
commit
178936b977
1 changed files with 3 additions and 1 deletions
|
|
@ -349,7 +349,9 @@ def add_file(self, path):
|
|||
upath = path.encode('utf-8') if isinstance(path, unicode) else path
|
||||
if not os.path.exists(upath):
|
||||
upath = upath.replace('&', '%26') #convertlit replaces & with %26 in file names
|
||||
raw = UnicodeDammit(open(upath, 'rb').read()).unicode
|
||||
f = open(upath, 'rb')
|
||||
raw = UnicodeDammit(f.read()).unicode
|
||||
f.close()
|
||||
soup = self.preprocess(raw)
|
||||
self.logger.info('\tConverting to BBeB...')
|
||||
self.current_page = None
|
||||
|
|
|
|||
Loading…
Reference in a new issue