From b6faa913668f68192c3cd2eaf2c1ce005811d32c Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Sat, 3 Jun 2017 13:16:39 +0200 Subject: 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. --- pkg/gcs/gcs.go | 3 --- 1 file changed, 3 deletions(-) (limited to 'pkg') 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) -- cgit mrf-deployment