Skip to content

Commit 93b6f3c

Browse files
author
Stephane Landelle
committed
Backport 13b9bd4
1 parent 5f42b96 commit 93b6f3c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/ning/http/client/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)