Fixes #47123
Change-Id: I2226b8a9ea24cd88171acfbaffea2566309416de
Reviewed-on: https://go-review.googlesource.com/c/go/+/334809
Trust: Alex Brainman <alex.brainman@gmail.com>
Trust: Hajime Hoshi <hajimehoshi@gmail.com>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
{`c:a\b`, false},
{`c:\a\b`, true},
{`c:/a/b`, true},
+ {`\\host\share`, true},
+ {`\\host\share\`, true},
{`\\host\share\foo`, true},
{`//host/share/foo/bar`, true},
}
if l == 0 {
return false
}
+ // If the volume name starts with a double slash, this is a UNC path.
+ if isSlash(path[0]) && isSlash(path[1]) {
+ return true
+ }
path = path[l:]
if path == "" {
return false