From 2b3a91335a5e53b5598f712b981c551df683ec7e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 29 Apr 2013 07:18:31 +0530 Subject: [PATCH] PDF Output: Fix link generation broken on windows when converting epubs if the filenames contained uppercase letters. Fixes #1169795 (Private bug) --- src/calibre/ebooks/pdf/render/links.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/pdf/render/links.py b/src/calibre/ebooks/pdf/render/links.py index c9d4d8d43c..a484c1a7d7 100644 --- a/src/calibre/ebooks/pdf/render/links.py +++ b/src/calibre/ebooks/pdf/render/links.py @@ -51,7 +51,7 @@ class Links(object): for link in self.links: path, href, frag = link[0] page, rect = link[1:] - combined_path = os.path.abspath(os.path.join(os.path.dirname(path), *unquote(href).split('/'))) + combined_path = os.path.normcase(os.path.abspath(os.path.join(os.path.dirname(path), *unquote(href).split('/')))) is_local = not href or combined_path in self.anchors annot = Dictionary({ 'Type':Name('Annot'), 'Subtype':Name('Link'),