From 5025587cca5bc20459193767cb91ae7dd5eafeb4 Mon Sep 17 00:00:00 2001 From: Wesley Beary Date: Tue, 8 Sep 2009 11:54:38 -0700 Subject: [PATCH] put_bucket should be idempotent --- lib/fog/aws/requests/s3/put_bucket.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/fog/aws/requests/s3/put_bucket.rb b/lib/fog/aws/requests/s3/put_bucket.rb index 061d95bc2..c07c48e48 100644 --- a/lib/fog/aws/requests/s3/put_bucket.rb +++ b/lib/fog/aws/requests/s3/put_bucket.rb @@ -58,7 +58,9 @@ else else bucket['LocationConstraint'] = '' end - Fog::AWS::S3.data[:buckets][bucket_name] = bucket + unless Fog::AWS::S3.data[:buckets][bucket_name] + Fog::AWS::S3.data[:buckets][bucket_name] = bucket + end response end