From e6142a543e0eb7f078115f48e2a3b950906adab4 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 1 Oct 2010 11:28:58 -0600 Subject: [PATCH] Better is_ebook_file --- src/calibre/library/check_library.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/calibre/library/check_library.py b/src/calibre/library/check_library.py index 641ee49312..b0bcb98123 100644 --- a/src/calibre/library/check_library.py +++ b/src/calibre/library/check_library.py @@ -130,8 +130,9 @@ class CheckLibrary(object): if not ext: return False ext = ext[1:].lower() - if ext not in EBOOK_EXTENSIONS or \ - self.bad_ext_pat.search(ext) is not None: + if ext in EBOOK_EXTENSIONS: + return True + if self.bad_ext_pat.search(ext) is not None: return False return True