X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/f1a70921e3bfc0496b5564582a5a1463b7a98c09..163fc34db7f29bc75a05c54b83c2a00c5ad899c2:/IkiWiki/Plugin/amazon_s3.pm 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.