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

Implement and check the behavior to calculate parents from exclusively-relative paths (., ..) #18

Closed
ForNeVeR opened this issue Apr 21, 2024 · 1 comment · Fixed by #83
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@ForNeVeR
Copy link
Owner

Currently, new LocalPath(".").Parent (the same for paths like .. or ../..) is not defined: I'm not sure what it should be.

We need to see how other libraries define this path's parent (I lean towards null) and implement the same logic.

@ForNeVeR ForNeVeR added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Apr 21, 2024
Kataane added a commit to Kataane/TruePath that referenced this issue Jul 20, 2024
@ForNeVeR
Copy link
Owner Author

After some work and discussion done in scope of #83, my current decision is that generally, (path1 / path2).Parent should yield the same result (if any) as path1 / path2.Parent.

Meaning new LocalPath(".").Parent should be .., and e.g. new LocalPath("../..").Parent should be ../../...

IIRC there's still a weird corner case in how we handle /.. absolute path (it could break the invariant); I am planning to handle that separately.

@ForNeVeR ForNeVeR self-assigned this Sep 22, 2024
@ForNeVeR ForNeVeR removed the help wanted Extra attention is needed label Sep 22, 2024
ForNeVeR added a commit to Kataane/TruePath that referenced this issue Sep 22, 2024
ForNeVeR added a commit to Kataane/TruePath that referenced this issue Sep 22, 2024
ForNeVeR added a commit to Kataane/TruePath that referenced this issue Sep 22, 2024
ForNeVeR added a commit to Kataane/TruePath that referenced this issue Sep 22, 2024
ForNeVeR pushed a commit to Kataane/TruePath that referenced this issue Sep 22, 2024
ForNeVeR added a commit to Kataane/TruePath that referenced this issue Sep 22, 2024
ForNeVeR added a commit to Kataane/TruePath that referenced this issue Sep 22, 2024
ForNeVeR added a commit to Kataane/TruePath that referenced this issue Sep 22, 2024
ForNeVeR added a commit to Kataane/TruePath that referenced this issue Sep 22, 2024
ForNeVeR added a commit to Kataane/TruePath that referenced this issue Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant