Skip to content
This repository was archived by the owner on Jul 21, 2023. It is now read-only.

Commit 13b9bd4

Browse files
committed
File may exist between vm restarts. Reduce noise for that case.
1 parent 81cabdc commit 13b9bd4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

api/src/main/java/org/asynchttpclient/resumable/PropertiesBasedResumableProcessor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ public void save(Map<String, Long> map) {
6060
FileOutputStream os = null;
6161
try {
6262

63-
if (!TMP.mkdirs()) {
63+
if (!TMP.exists() && !TMP.mkdirs()) {
6464
throw new IllegalStateException("Unable to create directory: " + TMP.getAbsolutePath());
6565
}
6666
File f = new File(TMP, storeName);
67-
if (!f.createNewFile()) {
67+
if (!f.exists() && !f.createNewFile()) {
6868
throw new IllegalStateException("Unable to create temp file: " + f.getAbsolutePath());
6969
}
7070
if (!f.canWrite()) {

0 commit comments

Comments
 (0)