fix(s3): fix deleting an empty folder issue and filename encoding (#429)

This commit is contained in:
itsHenry
2025-06-27 20:26:53 +08:00
committed by GitHub
parent e32cebb153
commit 18f7a2ba0e
8 changed files with 58 additions and 10 deletions

View File

@ -13,7 +13,7 @@ import (
"github.com/OpenListTeam/OpenList/internal/model"
"github.com/OpenListTeam/OpenList/internal/op"
"github.com/OpenListTeam/OpenList/internal/setting"
"github.com/OpenListTeam/gofakes3"
"github.com/itsHenry35/gofakes3"
)
type Bucket struct {
@ -21,6 +21,8 @@ type Bucket struct {
Path string `json:"path"`
}
const emptyObjectName = "ThisIsAnEmptyFolderInTheS3Bucket"
func getAndParseBuckets() ([]Bucket, error) {
var res []Bucket
err := json.Unmarshal([]byte(setting.GetStr(conf.S3Buckets)), &res)