Skip to content

Commit

Permalink
feat: double check options to ensure options not nil
Browse files Browse the repository at this point in the history
  • Loading branch information
warjiang committed Oct 25, 2023
1 parent 218fad5 commit 4b4a57e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion amazon.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func NewAmazonS3BackendWithOptions(bucket string, prefix string, region string,
client = &http.Client{Transport: tr}
}
s3ForcePathStyle := endpoint != ""
if options.S3ForcePathStyle != nil {
if options != nil && options.S3ForcePathStyle != nil {
s3ForcePathStyle = *options.S3ForcePathStyle
}
service := s3.New(session.New(), &aws.Config{
Expand Down

0 comments on commit 4b4a57e

Please sign in to comment.