diff options
Diffstat (limited to 'weed/command/filer_remote_gateway_buckets.go')
| -rw-r--r-- | weed/command/filer_remote_gateway_buckets.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/weed/command/filer_remote_gateway_buckets.go b/weed/command/filer_remote_gateway_buckets.go index e16e4f731..bd3e76859 100644 --- a/weed/command/filer_remote_gateway_buckets.go +++ b/weed/command/filer_remote_gateway_buckets.go @@ -13,6 +13,7 @@ import ( "github.com/golang/protobuf/proto" "math" "math/rand" + "path/filepath" "strings" "time" ) @@ -75,6 +76,16 @@ func (option *RemoteGatewayOptions) makeBucketedEventProcessor(filerSource *sour } bucketName := strings.ToLower(entry.Name) + if *option.include != "" { + if ok, _ := filepath.Match(*option.include, entry.Name); !ok { + return nil + } + } + if *option.exclude != "" { + if ok, _ := filepath.Match(*option.exclude, entry.Name); ok { + return nil + } + } if *option.createBucketRandomSuffix { // https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html if len(bucketName)+5 > 63 { |
