summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--aws.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/aws.go b/aws.go
index 6f7d385..c2aa35e 100644
--- a/aws.go
+++ b/aws.go
@@ -317,6 +317,9 @@ func (a *AwsConn) Download(bucket string, key string, path string) error {
Bucket: aws.String(bucket),
Key: &key,
})
+ if err != nil {
+ _ = os.Remove(path)
+ }
return err
}