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

path/filepath: Join / and ../.. gives / #59286

Closed
isuyyy opened this issue Mar 28, 2023 · 0 comments
Closed

path/filepath: Join / and ../.. gives / #59286

isuyyy opened this issue Mar 28, 2023 · 0 comments

Comments

@isuyyy
Copy link

isuyyy commented Mar 28, 2023

What version of Go are you using (go version)?

$ go version
1.21

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env

What did you do?

package main

import (
	"fmt"
	"path/filepath"
)

func main() {
	p1 := "/"
	p2 := "../.."

	fmt.Println(filepath.Join(p1, p2))
}

What did you expect to see?

/../..

What did you see instead?

/

I was just wondering if this is the expected behavior.
Just a heads up, Python default path library gives /../..

@isuyyy isuyyy closed this as not planned Won't fix, can't repro, duplicate, stale Mar 28, 2023
@golang golang locked and limited conversation to collaborators Mar 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants