]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: improve error message for names forbidden by Windows
authorIan Lance Taylor <iant@golang.org>
Mon, 7 Jan 2019 21:35:53 +0000 (13:35 -0800)
committerIan Lance Taylor <iant@golang.org>
Mon, 7 Jan 2019 22:08:17 +0000 (22:08 +0000)
Fixes #29589

Change-Id: I69ad461e70b236d9729a42053e35128437449e32
Reviewed-on: https://go-review.googlesource.com/c/156658
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/cmd/go/internal/module/module.go

index 8afd2739b86b1fdd9e81a6ba95f653e6168c5b60..481a90b1c46d3548545f0be070fe7cca22160ccf 100644 (file)
@@ -226,7 +226,7 @@ func checkElem(elem string, fileName bool) error {
        }
        for _, bad := range badWindowsNames {
                if strings.EqualFold(bad, short) {
-                       return fmt.Errorf("disallowed path element %q", elem)
+                       return fmt.Errorf("%q disallowed as path element component on Windows", short)
                }
        }
        return nil