From 6a571c519181f721808795cc907591941446166c Mon Sep 17 00:00:00 2001 From: Andrew Gerrand Date: Thu, 8 Sep 2011 10:43:40 +1000 Subject: [PATCH] [release-branch.r60] goinstall: error out with paths that end with '/' MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit ««« CL 4807048 / ae3b2b092cf7 goinstall: error out with paths that end with '/' R=adg, rsc, tarmigan+golang CC=golang-dev https://golang.org/cl/4807048 »»» R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/4968077 --- src/cmd/goinstall/main.go | 6 ++++++ 1 file changed, 6 insertions(+) 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) -- 2.48.1