mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
Fix #2372 (when converting .cbz files on OSX, Calibre chokes on OSX metadata files)
This commit is contained in:
parent
ad62a99f13
commit
ec9111aa7f
@ -70,6 +70,7 @@ def find_pages(dir, sort_on_mtime=False, verbose=False):
|
|||||||
for datum in os.walk(dir):
|
for datum in os.walk(dir):
|
||||||
for name in datum[-1]:
|
for name in datum[-1]:
|
||||||
path = os.path.join(datum[0], name)
|
path = os.path.join(datum[0], name)
|
||||||
|
if '__MACOSX' in path: continue
|
||||||
for ext in extensions:
|
for ext in extensions:
|
||||||
if path.lower().endswith('.'+ext):
|
if path.lower().endswith('.'+ext):
|
||||||
pages.append(path)
|
pages.append(path)
|
||||||
@ -222,13 +223,12 @@ def render_pages(tasks, dest, opts, notification=None):
|
|||||||
for num, path in tasks:
|
for num, path in tasks:
|
||||||
try:
|
try:
|
||||||
pages.extend(PageProcessor(path, dest, opts, num))
|
pages.extend(PageProcessor(path, dest, opts, num))
|
||||||
msg = _('Rendered %s')
|
msg = _('Rendered %s')%path
|
||||||
except:
|
except:
|
||||||
failures.append(path)
|
failures.append(path)
|
||||||
msg = _('Failed %s')
|
msg = _('Failed %s')%path
|
||||||
if opts.verbose:
|
if opts.verbose:
|
||||||
msg += '\n' + traceback.format_exc()
|
msg += '\n' + traceback.format_exc()
|
||||||
msg = msg%path
|
|
||||||
if notification is not None:
|
if notification is not None:
|
||||||
notification(0.5, msg)
|
notification(0.5, msg)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user