Catfish doesn't use locate command

Bug #1329801 reported by Denis Kovalev
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Catfish
Fix Released
High
Unassigned

Bug Description

To reproduce (the simplest way, with no debug): edit /usr/share/catfish/catfish/CatfishSearchEngine.py and leave only 'locate' as search method:

class CatfishSearchEngine:
    """CatfishSearchEngine is the collection of search backends that are used
    to perform a query. Each backend is a CatfishSearchMethod"""

    def __init__(self, methods=['locate']):

then run the application and try to search for any existing file/directory (with default search options). Catfish will return 'No results' although the corresponding locate command does find the results.

The case is that python3 (and python2) subprocess module use a list as the input command, not string, that's why CatfishSearchMethodExternal.run() doesn't work as expected. You may use the attached patch for CatfishSearchEngine.py
(installed: /usr/share/catfish/catfish/CatfishSearchEngine.py)

sudo patch /usr/share/catfish/catfish/CatfishSearchEngine.py <attached patch file>

Revision history for this message
Denis Kovalev (aikikode) wrote :
Revision history for this message
Si Dedman (si-dedman) wrote :

Looks like that's done the trick, cheers Denis, and extra cheers for explaining how to patch! :)

Will this be pushed into the next release for those subscribed to the PPA?

Revision history for this message
Sean Davis (bluesabre) wrote :

Thanks for the bug report and patch! I've rolled your fix into trunk.

Changed in catfish-search:
importance: Undecided → High
status: New → Fix Committed
Sean Davis (bluesabre)
Changed in catfish-search:
milestone: none → 1.0.3
status: Fix Committed → Fix Released
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.