Skip to content

path/filepath: filepath.Abs("") returned different results in windows and other systems #26763

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

Closed
moonfruit opened this issue Aug 2, 2018 · 2 comments

Comments

@moonfruit
Copy link

moonfruit commented Aug 2, 2018

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

1.10.3

Does this issue reproduce with the latest release?

yes

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

darwin,amd64 and windows,amd64

What did you do?

abs, err := filepath.Abs("")

example code

What did you expect to see?

filepath.Abs("") returns same results in all systems.

What did you see instead?

In windows, filepath.Abs("") returned an error which is The filename, directory name, or volume label syntax is incorrect.
And in macOS, filepath.Abs("") returned current working directory.

@ALTree
Copy link
Member

ALTree commented Aug 2, 2018

This is #24441 and it should be fixed on tip (to be released as Go1.11 soon). See CL 112935.

@bcmills
Copy link
Contributor

bcmills commented Aug 2, 2018

Closing as duplicate. Please let us know if this isn't fixed in go1.11beta2.

@bcmills bcmills closed this as completed Aug 2, 2018
@golang golang locked and limited conversation to collaborators Aug 2, 2019
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

4 participants