From 2e5fe9a0471340808776332f027c9dbdc4a90657 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 18 Mar 2009 20:32:47 -0700 Subject: [PATCH] Fix #2100 (Zipped HTML to Epub conversion error) --- src/calibre/ebooks/epub/from_html.py | 2 +- src/calibre/trac/plugins/download.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/calibre/ebooks/epub/from_html.py b/src/calibre/ebooks/epub/from_html.py index e13ac81fe0..822346453a 100644 --- a/src/calibre/ebooks/epub/from_html.py +++ b/src/calibre/ebooks/epub/from_html.py @@ -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:] diff --git a/src/calibre/trac/plugins/download.py b/src/calibre/trac/plugins/download.py index 1c2b95c668..014a26bff3 100644 --- a/src/calibre/trac/plugins/download.py +++ b/src/calibre/trac/plugins/download.py @@ -379,5 +379,4 @@ else: pi = os.path.join(destdir, 'calibre_postinstall') subprocess.call(pi, shell=True) return 0 - ''') - + ''') \ No newline at end of file