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
Unix/linux system filepath.VolumeName(\host\share\foo
) return ""
#41201
Comments
Doesn’t you mean \host\share? |
I am so sorry that I can not understand your words, I just can not get the right output of |
|
Are you running the code on Linux or Windows? It's only effective on Windows. |
Yep, I ran it on the Linux machine with VMware WorksStation |
On non-Windows systems, VolumeName always returns "".
That seems to be the behavior you are observing. |
Oh, I got it wrong by others doc, thinking that \host\share\foo is a path on unix 😢 , thank all of you for your help ❤️ |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I ran the following code
What did you expect to see?
the result should be
\host\share
like the doc saysWhat did you see instead?
the result is ""
I have seen the source code, such as
path.go
path_unix.go
so, in unix/linux system, volumeNameLen should be 0, and then VolumeName should be "", so is the doc wrong, or I got it wrong?
Thanks for solving my question
The text was updated successfully, but these errors were encountered: