aboutsummaryrefslogtreecommitdiff
path: root/weed/s3api/filer_util.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2019-07-08 12:37:20 -0700
committerChris Lu <chris.lu@gmail.com>2019-07-08 12:37:20 -0700
commit62843991f2df1450020b8fac4035f130fe3c5630 (patch)
tree57144089ca7f660ddb83a3403ea11a7653e8818d /weed/s3api/filer_util.go
parentcf2804eebdf0e9afe7e7ca21a3421012729c9f05 (diff)
downloadseaweedfs-62843991f2df1450020b8fac4035f130fe3c5630.tar.xz
seaweedfs-62843991f2df1450020b8fac4035f130fe3c5630.zip
s3: adjust object key
Diffstat (limited to 'weed/s3api/filer_util.go')
-rw-r--r--weed/s3api/filer_util.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/weed/s3api/filer_util.go b/weed/s3api/filer_util.go
index 4f2c1578b..84e3050cd 100644
--- a/weed/s3api/filer_util.go
+++ b/weed/s3api/filer_util.go
@@ -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
+} \ No newline at end of file