Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Widgets.py
diff options
context:
space:
mode:
authorflavio <fdanesse@gmail.com>2013-06-25 21:20:08 (GMT)
committer flavio <fdanesse@gmail.com>2013-06-25 21:20:08 (GMT)
commite4b87976b36ffb363720bbaeddd6f05f2ba60089 (patch)
tree0176bfda10d77558703ae4d34c370497a609ab7a /Widgets.py
parent8705ed1fd29c21bfbf03f2ad25faa645b65d6026 (diff)
Corrección para devolución de grep en archivos.
Diffstat (limited to 'Widgets.py')
-rw-r--r--Widgets.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/Widgets.py b/Widgets.py
index afef393..dd8ae95 100644
--- a/Widgets.py
+++ b/Widgets.py
@@ -2024,7 +2024,7 @@ class BusquedaGrep(Gtk.Dialog):
import commands
if os.path.isdir(self.path):
- result = commands.getoutput("grep -r -n %s %s" % (text, self.path))
+ result = commands.getoutput("grep -R -n %s %s" % (text, self.path))
result = result.splitlines()
elif os.path.isfile(self.path):
@@ -2035,8 +2035,12 @@ class BusquedaGrep(Gtk.Dialog):
for line in result:
dat = line.split(":")
- if len(dat) == 3: items.append([dat[0], dat[1], dat[2].strip()])
+ if os.path.isdir(self.path):
+ if len(dat) == 3: items.append([dat[0], dat[1], dat[2].strip()])
+ elif os.path.isfile(self.path):
+ if len(dat) == 2: items.append([self.path, dat[0], dat[1].strip()])
+
self.treeview.limpiar()
self.treeview.agregar_items(items)