CL 455716 added TestFromFS. This test was failing on Plan 9
because fromFS didn't return an empty string in case of error.
This change fixes TestFromFS by returning an empty string
in case of error.
Fixes #57142.
Change-Id: Ie50dfba5e70154d641f762fa43f1c26c3d12b6f6
Reviewed-on: https://go-review.googlesource.com/c/go/+/455835
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
Run-TryBot: David du Colombier <0intro@gmail.com>
func fromFS(path string) (string, error) {
if runtime.GOOS == "plan9" {
if len(path) > 0 && path[0] == '#' {
- return path, errInvalidPath
+ return "", errInvalidPath
}
}
for i := range path {