From 55eafb3a9aa952a14b0f141a2b11079e18f9af6b Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Sat, 25 Feb 2017 16:03:29 +0000 Subject: [PATCH] gcs: fix depth 1 directory listings --- googlecloudstorage/googlecloudstorage.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/googlecloudstorage/googlecloudstorage.go b/googlecloudstorage/googlecloudstorage.go index 8935acdb8..19809a32d 100644 --- a/googlecloudstorage/googlecloudstorage.go +++ b/googlecloudstorage/googlecloudstorage.go @@ -331,7 +331,7 @@ func (f *Fs) list(dir string, level int, fn listFn) error { if !strings.HasSuffix(prefix, "/") { continue } - err = fn(prefix[:len(prefix)-1], &object, true) + err = fn(prefix[rootLength:len(prefix)-1], &object, true) if err != nil { return err }