Skip to content

Commit fee061b

Browse files
committed
Delete file only if exists
1 parent 3743351 commit fee061b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/sdk-core/src/main/java/software/amazon/awssdk/core/internal/async/FileAsyncResponseTransformer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public void exceptionOccurred(Throwable throwable) {
8080
try {
8181
invokeSafely(fileChannel::close);
8282
} finally {
83-
invokeSafely(() -> Files.delete(path));
83+
invokeSafely(() -> Files.deleteIfExists(path));
8484
}
8585
cf.completeExceptionally(throwable);
8686
}

0 commit comments

Comments
 (0)