Skip to content

Commit 19e23fc

Browse files
author
YangSen-qn
committed
modify dns cache logic
1 parent 4c5b864 commit 19e23fc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

library/src/main/java/com/qiniu/android/storage/persistent/DnsCacheFile.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@ public DnsCacheFile(String directory) throws IOException {
2121
this.directory = directory;
2222
f = new File(directory);
2323

24-
if (!f.isDirectory()) {
25-
throw new IOException("does not mkdir");
26-
}
27-
2824
if (!f.exists()) {
2925
boolean r = f.mkdirs();
3026
if (!r) {
3127
throw new IOException("mkdir failed");
3228
}
3329
}
30+
31+
if (!f.isDirectory()) {
32+
throw new IOException("does not mkdir");
33+
}
3434
}
3535

3636
/**

0 commit comments

Comments
 (0)