aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--SlackTools/plugin.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/SlackTools/plugin.py b/SlackTools/plugin.py
index f6c0484..26b63ab 100644
--- a/SlackTools/plugin.py
+++ b/SlackTools/plugin.py
@@ -118,6 +118,8 @@ class SlackTools(callbacks.Plugin):
cursor.execute("select c.name, p.name, p.descrip from categories c, packages p where c.id=p.category and p.category=? and lower(p.name) glob ? order by c.name, p.name limit ?", (category, term, maxresults+1))
# file search (no way to specify category)
else:
+ if(term[:1] != '/'):
+ term = '*' + term + '*'
cursor.execute("select distinct c.name, p.name, p.descrip from categories c, packages p, files f where c.id=p.category and p.id=f.package and f.path glob ? order by c.name, p.name limit ?", (term, maxresults+1))
result = cursor.fetchall()