[kupfer] plugin.locate: Quote query when passing it to `locate'



commit 3affb23b15915a2133fa3eae8002d896fc4bf000
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date:   Tue Aug 18 19:03:42 2009 +0200

    plugin.locate: Quote query when passing it to `locate'

 kupfer/plugin/locate.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/kupfer/plugin/locate.py b/kupfer/plugin/locate.py
index ac32190..353eda8 100644
--- a/kupfer/plugin/locate.py
+++ b/kupfer/plugin/locate.py
@@ -39,7 +39,7 @@ class LocateQuerySource (Source):
 		self.max_items = 500
 
 	def get_items(self):
-		command = "locate --quiet --null --limit %d %s" % \
+		command = "locate --quiet --null --limit %d '%s'" % \
 				(self.max_items, self.query)
 		locate_output = os.popen(command).read()
 		files = locate_output.split("\x00")[:-1]



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]