]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
amazon_s3: Fix to support the EU S3 datacenter, which is more picky about attempts...
authorJoey Hess <joey@gnu.kitenet.net>
Tue, 9 Feb 2010 21:24:14 +0000 (16:24 -0500)
committerJoey Hess <joey@gnu.kitenet.net>
Tue, 9 Feb 2010 21:24:14 +0000 (16:24 -0500)
IkiWiki/Plugin/amazon_s3.pm
debian/changelog

index 3571c4189e43fe5b70e1032832a6978cded1af6b..cfd8cd3477f81dd0758564994f35979419e330a0 100644 (file)
@@ -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.
index 06d11aa29a044cb5cd052ea3c34f1dfcf41cfcd4..358a5dc5cc00d95aa88352ea36ef052e6c767f63 100644 (file)
@@ -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 <joeyh@debian.org>  Tue, 26 Jan 2010 22:25:33 -0500