do-plugins team mailing list archive
-
do-plugins team
-
Mailing list archive
-
Message #00994
[Bug 334798] [NEW] locate plugin with globbing
Public bug reported:
The locate plugin does not work correctly if the query has globbing
characters. eg 'foo*bar' will not return anything even if 'foo bar'
exists (and can be found by locate)
the reason appears to be the following:
// Only allow files that contain the query as a substring
// of the file name. It may be faster to use grep, but I've
// tested this and it seems prety snappy.
if (Path.GetFileName (path).ToLower().Contains (query)) {
results++;
files.Add (Services.UniverseFactory.NewFileItem (path) as Item);
}
This whole thing is unnecessary.. the "-b" option to locate does what's
intended here, without causing the problems that this is causing. I've
attached a patch to fix this. Note however that the patch is entirely
untested since I don't have compilers etc for C# (but it is such a
simple patch that it should not be a problem)
Also it would be nice to have an option that lets me use the regex
features of locate. Should I file a separate bug?
** Affects: do-plugins
Importance: Undecided
Status: New
--
locate plugin with globbing
https://bugs.launchpad.net/bugs/334798
You received this bug notification because you are a member of GNOME Do
Plugins Team, which is subscribed to GNOME Do Plugins.
Follow ups
References