From a4ec579d1a6632447db91f2e52e90633b96a070f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 9 Feb 2010 16:24:14 -0500 Subject: amazon_s3: Fix to support the EU S3 datacenter, which is more picky about attempts to create already existing buckets. --- IkiWiki/Plugin/amazon_s3.pm | 6 +++++- debian/changelog | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/IkiWiki/Plugin/amazon_s3.pm b/IkiWiki/Plugin/amazon_s3.pm index 3571c4189..cfd8cd347 100644 --- a/IkiWiki/Plugin/amazon_s3.pm +++ b/IkiWiki/Plugin/amazon_s3.pm @@ -132,6 +132,10 @@ sub getbucket { }); } + if (! $bucket) { + # Try to use existing bucket. + $bucket=$s3->bucket($config{amazon_s3_bucket}); + } if (! $bucket) { error(gettext("Failed to create S3 bucket: "). $s3->err.": ".$s3->errstr."\n"); @@ -178,7 +182,7 @@ sub writefile ($$$;$$) { # First, write the file to disk. my $ret=$IkiWiki::Plugin::amazon_s3::subs{'IkiWiki::writefile'}->($file, $destdir, $content, $binary, $writer); - + my @keys=IkiWiki::Plugin::amazon_s3::file2keys("$destdir/$file"); # Store the data in S3. diff --git a/debian/changelog b/debian/changelog index 06d11aa29..358a5dc5c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,8 @@ ikiwiki (3.20100123) UNRELEASED; urgency=low * auto-blog.setup: Lock all pages, so only admin can post to the blog by default, and enable opendiscussion so others can comment. * Fix color and format plugins to appear in the websetup interface. + * amazon_s3: Fix to support the EU S3 datacenter, which is more picky + about attempts to create already existing buckets. -- Joey Hess Tue, 26 Jan 2010 22:25:33 -0500 -- cgit v1.2.3