aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2017-06-03 13:16:39 +0200
committerDmitry Vyukov <dvyukov@google.com>2017-06-03 13:16:39 +0200
commitb6faa913668f68192c3cd2eaf2c1ce005811d32c (patch)
tree4f0ddc47f356cb89b86cfdb343c0fdc9c572d0d6
parentb08ca73a6e738eca81c61de4b6eb78c24ad7efc7 (diff)
pkg/gcs: remove support for gs:// prefixed paths
The problem with gs:// is that after any filepath.Join it's transformed to gs:/ which is not recognized. It's safer to not allow specifying them at all, rather than constantly breaking them.
-rw-r--r--pkg/gcs/gcs.go3
1 files changed, 0 insertions, 3 deletions
diff --git a/pkg/gcs/gcs.go b/pkg/gcs/gcs.go
index 0ac9fc455..0121d2aeb 100644
--- a/pkg/gcs/gcs.go
+++ b/pkg/gcs/gcs.go
@@ -100,9 +100,6 @@ func (client *Client) UploadFile(localFile, gcsFile string) error {
}
func split(file string) (bucket, filename string, err error) {
- if strings.HasPrefix(file, "gs://") {
- file = file[5:]
- }
pos := strings.IndexByte(file, '/')
if pos == -1 {
return "", "", fmt.Errorf("invalid GCS file name: %v", file)