gcs: fix depth 1 directory listings

This commit is contained in:
Nick Craig-Wood 2017-02-25 16:03:29 +00:00
parent 5b6dd36307
commit 55eafb3a9a

View File

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