From 7cce5e56c3252806f254a914a0623bb76721e11e Mon Sep 17 00:00:00 2001 From: Erik Vattekar Date: Fri, 15 Dec 2023 12:04:48 +0100 Subject: [PATCH] fix: quarto: ensure correct bucket path when searching for index.html --- pkg/gcs/gcs.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/gcs/gcs.go b/pkg/gcs/gcs.go index 3c7f6d59..6a17b1a2 100644 --- a/pkg/gcs/gcs.go +++ b/pkg/gcs/gcs.go @@ -32,6 +32,7 @@ func New(ctx context.Context, bucketName string, log *logrus.Entry) (*Client, er } func (c *Client) GetIndexHtmlPath(ctx context.Context, prefix string) (string, error) { + prefix, _ = strings.CutSuffix(prefix, "/") _, err := c.client.Bucket(c.bucketName).Object(prefix + "/index.html").NewReader(ctx) if err != nil { objs := c.client.Bucket(c.bucketName).Objects(ctx, &storage.Query{Prefix: prefix + "/"})