Closed
Bug 1146411
Opened 11 years ago
Closed 11 years ago
[mig modules] Pattern matching on path component in file module
Categories
(Enterprise Information Security Graveyard :: MIG, task)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: alm, Unassigned)
References
Details
Can we add support to pattern match on the path component as well?
For example, looking for common files like __init__.py, it can be useful to limit the matches to certain directories, like a specific library.
Comment 1•11 years ago
|
||
There is a significant amount of history on this particular features. The now defunct `filechecker` module has path expansion using Golang's filepath package [1]. Problem is, the syntax for filepath.Match() is different than what one would expect using bash's path expansion, which is also different from other shells or stuff you'd find on windows with %VARIABLES% expansion.
I considered reimplementing bash's path expansion code, but that's a lot of work and dark magic.
Taking the approach that too many choices are worse that none, I decided to remove the path pattern matching logic entirely. The `file` module doesn't support it at all. Instead, it supports searching on metadata, like filename, size, permissions, maxdepth, etc... which is almost as fast as matching a path, and has the benefit of having a deterministic behavior.
That said, if we can find a good way to implement path pattern matching in the file module, I'm up for it. But I will prefer no pattern matching to something that has potentially confusing behavior.
[1] http://golang.org/pkg/path/filepath/#Match
Blocks: 1116678
Summary: Pattern matching on path component → [mig modules] Pattern matching on path component in file module
| Reporter | ||
Comment 2•11 years ago
|
||
It's simple enough just to filter the results client side as well, closing.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
| Assignee | ||
Updated•10 years ago
|
Component: Operations Security (OpSec): MIG → MIG
Product: mozilla.org → Enterprise Information Security
Updated•6 years ago
|
Product: Enterprise Information Security → Enterprise Information Security Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•