gnomecatalog cannot search for multiple words

Bug #1054267 reported by wirespot
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GnomeCatalog
New
Undecided
Unassigned

Bug Description

Given a filename such as "foo_bar_baz.txt", a reasonable expectation of the user would be to find it when entering "foo baz" or "bar txt" in the search field.

Unfortunately, the DB search uses the search value as is (ie. "LIKE '%"+search+"%'") which means the whitespace will be considered part of the search and the file in the above example won't be found.

It's a very simple fix in /usr/share/pyshared/gnomecatalog, just replace search with "%".join(search.split()). I've attached the patch.

Revision history for this message
wirespot (wirespot) wrote :
Revision history for this message
wirespot (wirespot) wrote :

Come to think about it, you could do this for all three occurances of "search" in search_cond, not just the first one. :)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.