From 85698737be9b500333ad2c01d10f437cc4747c4e Mon Sep 17 00:00:00 2001 From: Charles Haley <> Date: Fri, 18 Mar 2011 17:12:41 +0000 Subject: [PATCH] In get_matches, verify that 'location' in fact exists -- is a valid search term. --- src/calibre/library/caches.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/library/caches.py b/src/calibre/library/caches.py index be996063d5..19ef7e213c 100644 --- a/src/calibre/library/caches.py +++ b/src/calibre/library/caches.py @@ -583,6 +583,8 @@ class ResultCache(SearchQueryParser): # {{{ candidates = self.universal_set() if len(candidates) == 0: return matches + if location not in self.all_search_locations: + return matches if len(location) > 2 and location.startswith('@') and \ location[1:] in self.db_prefs['grouped_search_terms']: