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

Provide an normalization routine for normalizing Path #2888

Open
adithyaov opened this issue Nov 29, 2024 · 2 comments · May be fixed by #2893
Open

Provide an normalization routine for normalizing Path #2888

adithyaov opened this issue Nov 29, 2024 · 2 comments · May be fixed by #2893
Assignees
Milestone

Comments

@adithyaov
Copy link
Member

We often compare paths by comparing the underlying arrays.
If one path is a/b and the other is a//b the equality check will fail.
Instead, we should ensure normalized paths or document that Path is not guaranteed to be normalized.

@harendra-kumar
Copy link
Member

It is not a good idea to normalize when creating. It will be expensive to normalize when constructing e.g. we will have to normalize all paths when reading a directory. It may be better to provide a normalized comparison rather. Or an explicit normalization routine.

@adithyaov
Copy link
Member Author

We should provide an explicit normalization routine.

@adithyaov adithyaov changed the title Normalize the paths while creating Path Provide an normalization routine for normalizing Path Dec 4, 2024
@adithyaov adithyaov linked a pull request Dec 6, 2024 that will close this issue
2 tasks
@adithyaov adithyaov self-assigned this Dec 17, 2024
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 a pull request may close this issue.

2 participants