-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Globs that start with "./" broken #28
Comments
While looking into this I also found out that I apologize, but I'm not sure that I will have time to fix this. (but of course PRs are welcome) You might have more luck using |
@nabijaczleweli can you confirm, that it is not only I am used to put things at some different location, which makes me require to use relative paths on an upper level. |
Appears so, yes. |
Hey guys, Also tagging @mitsuhiko and @Keats , because your crates depend on globwalk. Sorry for taking such long time to address this. Currently, Also note that absolute paths do not work intuitively at all:
This can be done in several ways and I'd like to hear your opinions:
Almost everything is a slight breaking change, but since this crate is Thoughts? |
Also note that since I'm not doing anything fancy with the pattern itself, all kinds of exotic patterns are not supported as well:
|
Thanks for the in-depth response @Gilnaa 😺 Personally I would prefer "proper" resolving of the given path, similar like bash works. Working with absolute paths even becomes evil on Windows, which is a bug in Rust itself (or at least it seems to me): rust-lang/rust#42869 I am using @Gilnaa In regards to compatibility ... would you prefer to have an option on this new behavior, or would you prefer a breaking change? |
Still not sure what behaviour I want. I lean towards having the default non recursive (like you'd expect). Always open to PRs of course, but the majority of the work seems to be design for now. |
This is because globwalk always returns an empty list in that case, which is likely not what users expect. The corresponding issue in globwalk is Gilnaa/globwalk#28. See Keats#574 for more discussion.
This is to work around an issue in globwalk (Gilnaa/globwalk#28) due to which paths starting with `./` or `../` never match anything. This fixes Keats#574.
This is to work around an issue in globwalk (Gilnaa/globwalk#28) due to which paths starting with `./` or `../` never match anything. This fixes Keats#574.
* Add test for globs starting with "./" This is a regression test for #574. * Always canonicalize glob paths passed to Tera This is to work around an issue in globwalk (Gilnaa/globwalk#28) due to which paths starting with `./` or `../` never match anything. This fixes #574.
Consider the following
main.rs
:And
Cargo.toml
:Running the resulting binary in a directory containing a checkout of
globwalk
:Note how an otherwise identical glob which started with
./
returned no results.The text was updated successfully, but these errors were encountered: