Skip to content

Commit af2bb02

Browse files
committed
update gosdk
1 parent 7387079 commit af2bb02

File tree

4 files changed

+14
-16
lines changed

4 files changed

+14
-16
lines changed

cmd/gateway/zcn/dStorage.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ func getFileReader(ctx context.Context,
376376

377377
}
378378

379-
func putFile(ctx context.Context, alloc *sdk.Allocation, remotePath, contentType string, r io.Reader, size int64, isUpdate bool, userDefined map[string]string) (err error) {
379+
func putFile(ctx context.Context, alloc *sdk.Allocation, remotePath, contentType string, r io.Reader, size int64, _ bool, userDefined map[string]string) (err error) {
380380
fileName := filepath.Base(remotePath)
381381
var customMeta string
382382
if len(userDefined) > 0 {
@@ -409,9 +409,7 @@ func putFile(ctx context.Context, alloc *sdk.Allocation, remotePath, contentType
409409
},
410410
StreamUpload: isStreamUpload,
411411
}
412-
if isUpdate {
413-
opRequest.OperationType = constants.FileOperationUpdate
414-
}
412+
415413
if isStreamUpload {
416414
err = alloc.DoMultiOperation([]sdk.OperationRequest{opRequest})
417415
if err != nil && !isSameRootError(err) {

cmd/gateway/zcn/gateway-zcn.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -493,15 +493,15 @@ func (zob *zcnObjects) ListObjects(ctx context.Context, bucket, prefix, marker,
493493
},
494494
nil
495495
}
496-
497-
if len(prefix) > 0 && prefix[len(prefix)-1] != '/' {
498-
return minio.ListObjectsInfo{
499-
IsTruncated: false,
500-
Objects: []minio.ObjectInfo{},
501-
Prefixes: []string{prefix + "/"},
502-
},
503-
nil
504-
}
496+
// warp does not send paths with trailing slash
497+
// if len(prefix) > 0 && prefix[len(prefix)-1] != '/' {
498+
// return minio.ListObjectsInfo{
499+
// IsTruncated: false,
500+
// Objects: []minio.ObjectInfo{},
501+
// Prefixes: []string{prefix + "/"},
502+
// },
503+
// nil
504+
// }
505505

506506
var objects []minio.ObjectInfo
507507
if prefix != "" {

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ toolchain go1.21.6
77
require (
88
cloud.google.com/go/storage v1.27.0
99
github.com/0chain/errors v1.0.3
10-
github.com/0chain/gosdk v1.16.3-0.20240727080737-9beaccc8f86e
10+
github.com/0chain/gosdk v1.16.3-0.20240808182737-94ef0df2e786
1111
github.com/Azure/azure-pipeline-go v0.2.2
1212
github.com/Azure/azure-storage-blob-go v0.10.0
1313
github.com/Shopify/sarama v1.28.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ github.com/0chain/common v0.0.6-0.20230127095721-8df4d1d72565 h1:z+DtCR8mBsjPnEs
6363
github.com/0chain/common v0.0.6-0.20230127095721-8df4d1d72565/go.mod h1:UyDC8Qyl5z9lGkCnf9RHJPMektnFX8XtCJZHXCCVj8E=
6464
github.com/0chain/errors v1.0.3 h1:QQZPFxTfnMcRdt32DXbzRQIfGWmBsKoEdszKQDb0rRM=
6565
github.com/0chain/errors v1.0.3/go.mod h1:xymD6nVgrbgttWwkpSCfLLEJbFO6iHGQwk/yeSuYkIc=
66-
github.com/0chain/gosdk v1.16.3-0.20240727080737-9beaccc8f86e h1:jQN2SLdgio227ZuhKyb0ce17nvV2g+2/ryLv9AMNCoc=
67-
github.com/0chain/gosdk v1.16.3-0.20240727080737-9beaccc8f86e/go.mod h1:y7Ucdmv40VltqulZnncMNjNQ4piX5Dta5ujNmPmXnxg=
66+
github.com/0chain/gosdk v1.16.3-0.20240808182737-94ef0df2e786 h1:IY+jgWVXHFcTzO4x8qOdiw9fW6lHXu05OpElra4kTAg=
67+
github.com/0chain/gosdk v1.16.3-0.20240808182737-94ef0df2e786/go.mod h1:y7Ucdmv40VltqulZnncMNjNQ4piX5Dta5ujNmPmXnxg=
6868
github.com/Azure/azure-amqp-common-go/v2 v2.1.0/go.mod h1:R8rea+gJRuJR6QxTir/XuEd+YuKoUiazDC/N96FiDEU=
6969
github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4=
7070
github.com/Azure/azure-pipeline-go v0.2.2 h1:6oiIS9yaG6XCCzhgAgKFfIWyo4LLCiDhZot6ltoThhY=

0 commit comments

Comments
 (0)