Skip to content
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

loading template files can easily get into an infinite loop #740

Open
PAStheLoD opened this issue Jul 30, 2022 · 1 comment
Open

loading template files can easily get into an infinite loop #740

PAStheLoD opened this issue Jul 30, 2022 · 1 comment

Comments

@PAStheLoD
Copy link

Hello,

Launching a program that has Tera::new("templates/**/*"); from the root directory on Linux causes globwalk to try to walk all available paths to find paths that start with "templates", but quickly gets lost in /proc/ (because it has some unfortunate symlink loops).

It might make sense to emit a warning if the current working directory is /, and/or do a quick and dirty hack of splitting the pattern along slashes (and make sure the first component is not a wildcard), and look for that subdirectory (and if it exists, supply the path of that as base dir to globwalk).

Also I believe this is the root case to be behind bug #719.

Thanks!

@Keats
Copy link
Owner

Keats commented Aug 7, 2022

I'd take a PR for that!

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

No branches or pull requests

2 participants