-
Notifications
You must be signed in to change notification settings - Fork 18k
path/filepath: Rel returns error in Windows if no Separator after drive #13208
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
Comments
I think the failure of filepath.Rel(
The error message needs work (filled issue #13259 for that). Please reopen, if you think I missed something. Alex |
I think Like the example in filepath.Rel() that That said, the Andrew |
cmd.exe thinks differently:
This is wrong too. "C:" means "C:.". Alex |
I got it. You are right. Maybe we need to note this special case in the Rel() document and let the user add the Separator themselves if they intend to the root of the VolumnName. Or make it default to root if it's just VolumnName. Andrew |
C: has no meaning unless you know what the "C: current directory" is. This is a general filepath concept. I don't see how it is useful to mention this is Rel documentation. Alex |
Windowns 8.1
Go 1.5.1
filepath.Rel()
will return error if there is no Separator at the end of disk letter:It's OK only if there is a Separator at the end:
Is this behavior as expected or an issue?
Andrew
The text was updated successfully, but these errors were encountered: