]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/amazon_s3.pm
qualify template_file
[git.ikiwiki.info.git] / IkiWiki / Plugin / amazon_s3.pm
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.