mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-19 06:58:25 +08:00
fail fast if user configures collection for a bucket
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"math"
|
"math"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/chrislusf/seaweedfs/weed/filer"
|
"github.com/chrislusf/seaweedfs/weed/filer"
|
||||||
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
|
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
|
||||||
@@ -88,6 +89,9 @@ func (c *commandFsConfigure) Do(args []string, commandEnv *CommandEnv, writer io
|
|||||||
Ttl: *ttl,
|
Ttl: *ttl,
|
||||||
Fsync: *fsync,
|
Fsync: *fsync,
|
||||||
}
|
}
|
||||||
|
if *collection != "" && strings.HasPrefix(*locationPrefix, "/buckets/") {
|
||||||
|
return fmt.Errorf("one s3 bucket goes to one collection and not customizable.")
|
||||||
|
}
|
||||||
if *isDelete {
|
if *isDelete {
|
||||||
fc.DeleteLocationConf(*locationPrefix)
|
fc.DeleteLocationConf(*locationPrefix)
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user