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

@@ -4,6 +4,7 @@ import (
"context"
"fmt"
"os"
"strings"
"time"
"github.com/chrislusf/seaweedfs/weed/glog"
@@ -143,3 +144,11 @@ func (s3a *S3ApiServer) exists(ctx context.Context, parentDirectoryPath string,
return
}
func objectKey(key *string) *string {
if strings.HasPrefix(*key, "/") {
t := (*key)[1:]
return &t
}
return key
}