We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 26b98e1 commit 312ae16Copy full SHA for 312ae16
src/cmd/go/internal/get/path.go
@@ -41,9 +41,6 @@ func checkPath(path string, fileName bool) error {
41
if path == "" {
42
return fmt.Errorf("empty string")
43
}
44
- if strings.Contains(path, "..") {
45
- return fmt.Errorf("double dot")
46
- }
47
if strings.Contains(path, "//") {
48
return fmt.Errorf("double slash")
49
@@ -59,8 +56,10 @@ func checkPath(path string, fileName bool) error {
59
56
elemStart = i + 1
60
57
61
58
62
- if err := checkElem(path[elemStart:], fileName); err != nil {
63
- return err
+ if path[elemStart:] != "..." {
+ if err := checkElem(path[elemStart:], fileName); err != nil {
+ return err
+ }
64
65
return nil
66
0 commit comments