diff --git a/gcsfs/fs.go b/gcsfs/fs.go index b2a78fc..1b854f8 100644 --- a/gcsfs/fs.go +++ b/gcsfs/fs.go @@ -54,6 +54,7 @@ func NewGcsFsWithSeparator(ctx context.Context, client stiface.Client, folderSep ctx: ctx, client: client, separator: folderSep, + buckets: make(map[string]stiface.BucketHandle), rawGcsObjects: make(map[string]*GcsFile), autoRemoveEmptyFolders: true, @@ -109,6 +110,7 @@ func (fs *Fs) getBucket(name string) (stiface.BucketHandle, error) { if err != nil { return nil, err } + fs.buckets[name] = bucket } return bucket, nil }