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

Support absolute path in exclude #1609

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cedricbuild
Copy link

fixes #1577

.map(|p| {
let path = Path::new(p);
let relative_path = if path.is_absolute() {
let cwd = env::current_dir().unwrap_or("".into());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't work if one or more search paths is given to fd, since it needs to be relative to the search path, which may not be the current directory.

.exclude
.iter()
.map(|p| {
let path = Path::new(p);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It isn't a path, it's a pattern.

What if there is a glob that occurs between the root and the search path?

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.

exclude and absolute path as argument
2 participants