1
0
Fork 0
mirror of https://github.com/chrislusf/seaweedfs synced 2024-05-02 01:27:55 +02:00

fail fast if user configures collection for a bucket

This commit is contained in:
Chris Lu 2020-11-16 19:57:08 -08:00
parent c13db8de80
commit 9add554feb

View file

@ -7,6 +7,7 @@ import (
"io"
"math"
"net/http"
"strings"
"github.com/chrislusf/seaweedfs/weed/filer"
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
@ -88,6 +89,9 @@ func (c *commandFsConfigure) Do(args []string, commandEnv *CommandEnv, writer io
Ttl: *ttl,
Fsync: *fsync,
}
if *collection != "" && strings.HasPrefix(*locationPrefix, "/buckets/") {
return fmt.Errorf("one s3 bucket goes to one collection and not customizable.")
}
if *isDelete {
fc.DeleteLocationConf(*locationPrefix)
} else {