From df46544ee8fde3718933cb59c19ce2634246ac29 Mon Sep 17 00:00:00 2001 From: Charles Haley <> Date: Thu, 24 Feb 2011 15:02:19 +0000 Subject: [PATCH] Fix searching for prefixes where the prefix exists on a non-matching item --- src/calibre/library/caches.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calibre/library/caches.py b/src/calibre/library/caches.py index 4f5a034222..e626d446d2 100644 --- a/src/calibre/library/caches.py +++ b/src/calibre/library/caches.py @@ -128,7 +128,8 @@ def _match(query, value, matchkind): if query[0] == '.': if t.startswith(query[1:]): ql = len(query) - 1 - return (len(t) == ql) or (t[ql:ql+1] == '.') + if (len(t) == ql) or (t[ql:ql+1] == '.'): + return True elif query == t: return True elif ((matchkind == REGEXP_MATCH and re.search(query, t, re.I)) or ### search unanchored