Skip to content

Non-parity wildcard/globbing behavior on include #64

@nf-brentsaner

Description

@nf-brentsaner

When NGINX encounters an include foo/* directive, it does NOT include hidden files in the globbed match.

However, a *(github.com/tufanbarisyildirim/gonginx/parser.Parser).Parse() with a parser.Optiion of parser.WithIncludeParsing() does include hidden files if that include directive uses wildcards/globs.

This has led to a particularly confusing bug for us, as nginx -t validates but the parsing would fail consistently. :)

If include parsing is enabled, I'd filter the globbed list and filter each item out of it matches an if strings.HasPrefix(filepath.Base(fname), ".") (where fname is the filename/filepath, and filepath is stdlib's path/filepath).

Metadata

Metadata

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions