404 should result in upload

This commit is contained in:
Brad Rydzewski 2016-11-19 12:05:58 +01:00 committed by GitHub
parent 1f515374c1
commit 966a9fd141

4
aws.go
View File

@ -108,8 +108,8 @@ func (a *AWS) Upload(local, remote string) error {
Bucket: aws.String(p.Bucket),
Key: aws.String(remote),
})
if err != nil && err.(awserr.Error).Code() != "404" {
if err.(awserr.Error).Code() == "404" {
if err != nil {
if err.(awserr.Error).Code() != "404" {
return err
}