This commit is contained in:
Page Asgardius 2024-03-06 05:37:00 -07:00
parent cb98852772
commit 85b5d2653c

View file

@ -9,6 +9,7 @@ import (
"regexp"
"strings"
"time"
"net/url"
"github.com/minio/minio-go/v7"
)
@ -37,8 +38,11 @@ func HandleBucketView(s3 S3, templates fs.FS, allowDelete bool, listRecursive bo
regex := regexp.MustCompile(`\/buckets\/([^\/]*)\/?(.*)`)
matches := regex.FindStringSubmatch(r.RequestURI)
bucketName := matches[1]
path := matches[2]
path, rqerr := url.QueryUnescape(matches[2])
if rqerr != nil {
handleHTTPError(w, rqerr)
return
}
var objs []objectWithIcon
doneCh := make(chan struct{})
defer close(doneCh)