diff options
| author | Tarmigan Casebolt <tarmigan@gmail.com> | 2011-08-21 20:28:29 +1000 |
|---|---|---|
| committer | Andrew Gerrand <adg@golang.org> | 2011-08-21 20:28:29 +1000 |
| commit | f7b9ac765b9febe3be51cb6e29ed907279f08b59 (patch) | |
| tree | 4a134a78dd87471971cc9444e6382299fc1711f9 /src/cmd/goinstall | |
| parent | d1a3edaee72d6ac7d4e74017dc12d34da153dcbe (diff) | |
| download | go-f7b9ac765b9febe3be51cb6e29ed907279f08b59.tar.xz | |
goinstall: error out with paths that end with '/'
R=adg, rsc, tarmigan+golang
CC=golang-dev
https://golang.org/cl/4807048
Diffstat (limited to 'src/cmd/goinstall')
| -rw-r--r-- | src/cmd/goinstall/main.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cmd/goinstall/main.go b/src/cmd/goinstall/main.go index 910ab7090a..baea260e56 100644 --- a/src/cmd/goinstall/main.go +++ b/src/cmd/goinstall/main.go @@ -182,6 +182,12 @@ func install(pkg, parent string) { visit[pkg] = done }() + // Don't allow trailing '/' + if _, f := filepath.Split(pkg); f == "" { + errorf("%s should not have trailing '/'\n", pkg) + return + } + // Check whether package is local or remote. // If remote, download or update it. tree, pkg, err := build.FindTree(pkg) |
