From 6165c67a6005b31aff48e0d7495b8a8ec210988a Mon Sep 17 00:00:00 2001 From: Marcin Kaciuba Date: Mon, 22 May 2023 10:34:55 +0200 Subject: [PATCH] fix: aws sdk v2 doesn't trim / --- pkg/storage/storage.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/storage/storage.go b/pkg/storage/storage.go index c1c7473..fec8955 100644 --- a/pkg/storage/storage.go +++ b/pkg/storage/storage.go @@ -460,7 +460,7 @@ func getClient(obj *object.FileObject) (storageClient, error) { func getKey(obj *object.FileObject) string { switch obj.Storage.Kind { - case "b2": + case "b2", "s3": return strings.TrimPrefix(path.Join(obj.Storage.PathPrefix, obj.Key), "/") default: return path.Join(obj.Storage.PathPrefix, obj.Key)