Skip to content

libglob: support "."/".." in file globs and fix patterns with trailing "/"#13383

Merged
bors merged 2 commits intorust-lang:masterfrom
ben0x539:glob-dots
Apr 9, 2014
Merged

libglob: support "."/".." in file globs and fix patterns with trailing "/"#13383
bors merged 2 commits intorust-lang:masterfrom
ben0x539:glob-dots

Conversation

@ben0x539
Copy link
Copy Markdown
Contributor

@ben0x539 ben0x539 commented Apr 7, 2014

Fixes #12930.

ben0x539 added 2 commits April 8, 2014 01:21
... also don't read the whole directory if the glob for that path
component doesn't contain any metacharacters.

Patterns like `../*.jpg` will work now, and `.*` will match both `.` and
`..` to be consistent with shell expansion.

As before: Just `*` still won't match `.` and `..`, while it will still
match dotfiles like `.git` by default.
`foo.txt/` should not return `foo.txt` if `foo.txt` is in fact a text
file and not a directory.
bors added a commit that referenced this pull request Apr 9, 2014
@bors bors closed this Apr 9, 2014
@bors bors merged commit 1700f35 into rust-lang:master Apr 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

glob::glob not match "./*.rs"

3 participants