From 70944924286b85081414e9ce9ee01197c6239209 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Thu, 12 Nov 2020 13:30:46 -0800 Subject: [PATCH] fix ErrNotFound --- weed/s3api/s3api_bucket_handlers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/s3api/s3api_bucket_handlers.go b/weed/s3api/s3api_bucket_handlers.go index ad50e7cca..c892999f1 100644 --- a/weed/s3api/s3api_bucket_handlers.go +++ b/weed/s3api/s3api_bucket_handlers.go @@ -164,8 +164,8 @@ func (s3a *S3ApiServer) HeadBucketHandler(w http.ResponseWriter, r *http.Request bucket, _ := getBucketAndObject(r) - if entry == nil || err != nil { entry, err := s3a.getEntry(s3a.option.BucketsPath, bucket) + if entry == nil || err == filer_pb.ErrNotFound { writeErrorResponse(w, s3err.ErrNoSuchBucket, r.URL) return }