Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-schlichtherle committed Jun 24, 2018
2 parents 3a21db2 + e808c19 commit 7a0039a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions aws/src/main/java/global/namespace/fun/io/aws/AWS.java
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,12 @@ public Socket<OutputStream> output() {
public void close() throws IOException {
super.close();
if (temp.isFile()) { // idempotence!
client.putObject(b -> b.bucket(bucket).key(object.key()),
RequestBody.fromFile(temp));
temp.delete();
try {
client.putObject(b -> b.bucket(bucket).key(object.key()),
RequestBody.fromFile(temp));
} finally {
temp.delete();
}
}
}
};
Expand Down

0 comments on commit 7a0039a

Please sign in to comment.