Skip to content

fix: start with . #19

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

Merged
merged 2 commits into from
Feb 25, 2025
Merged

fix: start with . #19

merged 2 commits into from
Feb 25, 2025

Conversation

cheeslide
Copy link
Contributor

./foo and foo are the same

fix #9

./foo and foo are the same
@cheeslide cheeslide marked this pull request as ready for review February 23, 2025 02:15
Comment on lines +62 to +67
if let Some(Component::CurDir) = ita.clone().next() {
ita.next();
}
if let Some(Component::CurDir) = itb.clone().next() {
itb.next();
}
Copy link

Choose a reason for hiding this comment

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

Should this be in the loop? what about "foo/./bar" and "foo/bar"

Maybe even in a while loop?

  • "././foo" and "foo"
  • or "foo/././bar" and "foo/bar"`.

Copy link
Contributor Author

@cheeslide cheeslide Feb 23, 2025

Choose a reason for hiding this comment

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

@whitty At least after 1.31.0, components() will normalize the path: "Occurrences of . are normalized away, except if they are at the beginning of the path."

@Manishearth
Copy link
Owner

CI fails

@cheeslide
Copy link
Contributor Author

CI fails

that may because I forget the utf8_paths module. Please try the CI again now.

@Manishearth Manishearth merged commit bf1ea6a into Manishearth:master Feb 25, 2025
2 checks passed
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.

Relative paths with . are not handled correctly
3 participants