Fix bucket name case sensitivity in remote gateway (#7910)

Remove strings.ToLower conversion that was forcing bucket names to
lowercase when creating remote storage buckets. This preserves case
consistency between local filer paths and remote bucket names.

The previous behavior converted bucket names like "MyBucket" to
"mybucket" for remote storage, creating a mismatch with the local
filer directory name. Cloud providers like AWS S3 support mixed-case
bucket names and will enforce their own naming rules if needed.

Fixes: https://github.com/seaweedfs/seaweedfs/discussions/7910
This commit is contained in:
Chris Lu
2025-12-29 23:35:41 -08:00
parent b6d99f1c9e
commit e439c7031a
+7 -6
View File
@@ -3,6 +3,12 @@ package command
import (
"context"
"fmt"
"math"
"math/rand"
"path/filepath"
"strings"
"time"
"github.com/seaweedfs/seaweedfs/weed/filer"
"github.com/seaweedfs/seaweedfs/weed/glog"
"github.com/seaweedfs/seaweedfs/weed/pb"
@@ -12,11 +18,6 @@ import (
"github.com/seaweedfs/seaweedfs/weed/replication/source"
"github.com/seaweedfs/seaweedfs/weed/util"
"google.golang.org/protobuf/proto"
"math"
"math/rand"
"path/filepath"
"strings"
"time"
)
func (option *RemoteGatewayOptions) followBucketUpdatesAndUploadToRemote(filerSource *source.FilerSource) error {
@@ -100,7 +101,7 @@ func (option *RemoteGatewayOptions) makeBucketedEventProcessor(filerSource *sour
return err
}
bucketName := strings.ToLower(entry.Name)
bucketName := entry.Name
if *option.include != "" {
if ok, _ := filepath.Match(*option.include, entry.Name); !ok {
return nil