From fe49fbcc93f08709c12894a8f9f668d45a96299b Mon Sep 17 00:00:00 2001 From: Yosuke Hara Date: Sun, 4 Jan 2026 20:05:29 +0900 Subject: [PATCH 1/2] Fix s3 bucket implementation --- src/leo_s3_bucket.erl | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/leo_s3_bucket.erl b/src/leo_s3_bucket.erl index 6e8f7c9..fba2e21 100644 --- a/src/leo_s3_bucket.erl +++ b/src/leo_s3_bucket.erl @@ -65,13 +65,7 @@ start(slave = Type, Provider, SyncInterval) -> catch ets:new(?BUCKET_TABLE, [named_table, ordered_set, public, {read_concurrency, true}]), catch ets:new(?BUCKET_INFO, [named_table, set, public, {read_concurrency, true}]), - - case Provider of - [] -> - void; - _ -> - ok = setup(Type, ets, Provider, SyncInterval) - end, + ok = setup(Type, ets, Provider, SyncInterval), ok; start(master = Type, _Provider, SyncInterval) -> From c53cd728b79be7eb9614c53bf8dcb8df9b23add7 Mon Sep 17 00:00:00 2001 From: Yosuke Hara Date: Sun, 4 Jan 2026 20:14:21 +0900 Subject: [PATCH 2/2] Fix auth test implementation --- src/leo_s3_auth.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/leo_s3_auth.erl b/src/leo_s3_auth.erl index 170928d..c014a03 100644 --- a/src/leo_s3_auth.erl +++ b/src/leo_s3_auth.erl @@ -860,7 +860,8 @@ auth_sub_resources(QueryStr) -> -ifdef(TEST). auth_uri_test() -> Bucket = <<"photo">>, - <<"">> = auth_uri(Bucket, <<"/photo">>, <<"/photo">>), + %% For bucket operations, AWS S3 canonical resource ends with "/" (e.g., /bucket/) + <<"/">> = auth_uri(Bucket, <<"/photo">>, <<"/photo">>), <<"/photo">> = auth_uri(Bucket, <<"/photo">>, <<"/photo/photo">>), <<"/">> = auth_uri(Bucket, <<"/photo/">>, <<"/photo/">>),