rename function

This commit is contained in:
Chris Lu 2020-11-12 13:30:08 -08:00
parent ed3b0f81c6
commit c6a0704019
2 changed files with 3 additions and 3 deletions

View file

@ -76,7 +76,7 @@ func (s3a *S3ApiServer) exists(parentDirectoryPath string, entryName string, isD
}
func (s3a *S3ApiServer) get(parentDirectoryPath, entryName string) (entry *filer_pb.Entry, err error) {
func (s3a *S3ApiServer) getEntry(parentDirectoryPath, entryName string) (entry *filer_pb.Entry, err error) {
fullPath := util.NewFullPath(parentDirectoryPath, entryName)
return filer_pb.GetEntry(s3a, fullPath)
}

View file

@ -120,7 +120,7 @@ func (s3a *S3ApiServer) DeleteBucketHandler(w http.ResponseWriter, r *http.Reque
bucket, _ := getBucketAndObject(r)
entry, err := s3a.get(s3a.option.BucketsPath, bucket)
entry, err := s3a.getEntry(s3a.option.BucketsPath, bucket)
if entry == nil || err == filer_pb.ErrNotFound {
writeErrorResponse(w, s3err.ErrNoSuchBucket, r.URL)
return
@ -164,8 +164,8 @@ func (s3a *S3ApiServer) HeadBucketHandler(w http.ResponseWriter, r *http.Request
bucket, _ := getBucketAndObject(r)
entry, err := s3a.get(s3a.option.BucketsPath, bucket)
if entry == nil || err != nil {
entry, err := s3a.getEntry(s3a.option.BucketsPath, bucket)
writeErrorResponse(w, s3err.ErrNoSuchBucket, r.URL)
return
}