From 8062c04b817d0193f7a597c874458aa468f43d1d Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 1 Oct 2010 03:38:16 -0600 Subject: [PATCH] EPUB Input: Ignore OPF files in the EPUB whose names start with a period --- src/calibre/ebooks/epub/input.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calibre/ebooks/epub/input.py b/src/calibre/ebooks/epub/input.py index 214511ae14..cdd69ea50f 100644 --- a/src/calibre/ebooks/epub/input.py +++ b/src/calibre/ebooks/epub/input.py @@ -117,7 +117,8 @@ class EPUBInput(InputFormatPlugin): encfile = os.path.abspath(os.path.join('META-INF', 'encryption.xml')) opf = None for f in walk(u'.'): - if f.lower().endswith('.opf') and '__MACOSX' not in f: + if f.lower().endswith('.opf') and '__MACOSX' not in f and \ + not os.path.basename(f).startswith('.'): opf = os.path.abspath(f) break path = getattr(stream, 'name', 'stream')