From df90ed406f18cdc3341c88e9e3f4bde171c3065f Mon Sep 17 00:00:00 2001 From: Edward Muller Date: Mon, 2 Apr 2012 18:15:34 -0700 Subject: [PATCH] All directories.create on us-east-1 --- lib/fog/aws/models/storage/directory.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/fog/aws/models/storage/directory.rb b/lib/fog/aws/models/storage/directory.rb index b346aeb12..f9c333b30 100644 --- a/lib/fog/aws/models/storage/directory.rb +++ b/lib/fog/aws/models/storage/directory.rb @@ -107,7 +107,10 @@ module Fog if @acl options['x-amz-acl'] = @acl end - options['LocationConstraint'] = @location || self.connection.region + lc = @location || self.connection.region + if lc != 'us-east-1' # us-east-1 is not valid: See http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketPUT.html + options['LocationConstraint'] = lc + end connection.put_bucket(key, options) true end