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.
This commit is contained in:
Dmitry Vyukov 2017-06-03 13:16:39 +02:00
parent b08ca73a6e
commit b6faa91366

View File

@ -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)