From bb1e9e0a829a073a00512a838ffa515eae2aa15d Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Wed, 6 Jan 2016 18:17:17 +0000 Subject: [PATCH] GCS Storagedriver: fix test failure caused by #1187 Signed-off-by: Arthur Baars --- registry/storage/driver/gcs/gcs.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/registry/storage/driver/gcs/gcs.go b/registry/storage/driver/gcs/gcs.go index 4cef972c..2b190dec 100644 --- a/registry/storage/driver/gcs/gcs.go +++ b/registry/storage/driver/gcs/gcs.go @@ -461,6 +461,11 @@ func (d *driver) List(context ctx.Context, path string) ([]string, error) { break } } + if path != "/" && len(list) == 0 { + // Treat empty response as missing directory, since we don't actually + // have directories in Google Cloud Storage. + return nil, storagedriver.PathNotFoundError{Path: path} + } return list, nil }