]> git.lizzy.rs Git - rust.git/commit
libglob: allow "." and ".." to be matched
authorBenjamin Herr <ben@0x539.de>
Mon, 7 Apr 2014 12:47:04 +0000 (14:47 +0200)
committerBenjamin Herr <ben@0x539.de>
Mon, 7 Apr 2014 23:21:28 +0000 (01:21 +0200)
commit4051bd900abbb47557dd8928532eedbc2bca0563
treed9b598f7054e3b24a27e4d24573c837c10143e45
parentf1f50565a1fda0dfd60d89fea65e2328f42cc5e0
libglob: allow "." and ".." to be matched

... 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.
src/libglob/lib.rs
src/test/run-pass/glob-std.rs