From 414f3ca778b355aa498d4e980a77894944fe73d0 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 30 Sep 2008 07:59:50 -0700 Subject: [PATCH] Fix #1099 (EPUB Conversion Error - occurs on all files) --- src/calibre/ebooks/epub/from_html.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calibre/ebooks/epub/from_html.py b/src/calibre/ebooks/epub/from_html.py index 8e9c0dd1ec..e5fe93ce27 100644 --- a/src/calibre/ebooks/epub/from_html.py +++ b/src/calibre/ebooks/epub/from_html.py @@ -132,8 +132,9 @@ def resize_cover(im, opts): def process_title_page(mi, filelist, htmlfilemap, opts, tdir): old_title_page = None + f = lambda x : os.path.normcase(os.path.normpath(x)) if mi.cover: - if os.path.samefile(filelist[0].path, mi.cover): + if f(filelist[0].path) == f(mi.cover): old_title_page = htmlfilemap[filelist[0].path] #logger = logging.getLogger('html2epub')