Fix #2100 (Zipped HTML to Epub conversion error)

This commit is contained in:
Kovid Goyal 2009-03-18 20:32:47 -07:00
parent 70570d7c89
commit 2e5fe9a047
2 changed files with 2 additions and 3 deletions

View File

@ -108,7 +108,7 @@ def find_html_index(files):
html_files = [f[0] for f in html_files]
for q in ('toc', 'index'):
for f in html_files:
if os.path.splitext(f)[0].lower() == q:
if os.path.splitext(os.path.basename(f))[0].lower() == q:
return f, os.path.splitext(f)[1].lower()[1:]
return html_files[-1], os.path.splitext(html_files[-1])[1].lower()[1:]

View File

@ -379,5 +379,4 @@ else:
pi = os.path.join(destdir, 'calibre_postinstall')
subprocess.call(pi, shell=True)
return 0
''')
''')