s3: adjust object key

This commit is contained in:
Chris Lu
2019-07-08 12:37:20 -07:00
parent cf2804eebd
commit 62843991f2
4 changed files with 21 additions and 8 deletions

View File

@@ -7,6 +7,7 @@ import (
"net/url"
"path/filepath"
"strconv"
"strings"
"time"
"github.com/chrislusf/seaweedfs/weed/filer2"
@@ -91,6 +92,9 @@ func (s3a *S3ApiServer) listFilerEntries(ctx context.Context, bucket, originalPr
// convert full path prefix into directory name and prefix for entry name
dir, prefix := filepath.Split(originalPrefix)
if strings.HasPrefix(dir, "/") {
dir = dir[1:]
}
// check filer
err = s3a.withFilerClient(ctx, func(client filer_pb.SeaweedFilerClient) error {