mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-02-04 01:25:02 +01:00
Fix #6773 (Slightly broken CHM file)
This commit is contained in:
parent
8b73bb52e8
commit
fb053fe3f3
1 changed files with 5 additions and 1 deletions
|
|
@ -132,7 +132,11 @@ def ExtractFiles(self, output_dir=os.getcwdu()):
|
|||
for path in self.Contents():
|
||||
lpath = os.path.join(output_dir, path)
|
||||
self._ensure_dir(lpath)
|
||||
data = self.GetFile(path)
|
||||
try:
|
||||
data = self.GetFile(path)
|
||||
except:
|
||||
self.log.exception('Failed to extract %s from CHM, ignoring'%path)
|
||||
continue
|
||||
if lpath.find(';') != -1:
|
||||
# fix file names with ";<junk>" at the end, see _reformat()
|
||||
lpath = lpath.split(';')[0]
|
||||
|
|
|
|||
Loading…
Reference in a new issue