locate plugin with globbing
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Do Plugins |
Fix Released
|
Wishlist
|
Alex Launi |
Bug Description
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).
results++;
files.Add (Services.
}
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?
Related branches
Changed in do-plugins: | |
assignee: | nobody → alexlauni |
importance: | Undecided → Wishlist |
status: | New → Fix Committed |
Changed in do-plugins: | |
status: | Fix Committed → Fix Released |