We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 228884a commit 4c5b864Copy full SHA for 4c5b864
library/src/main/java/com/qiniu/android/storage/persistent/DnsCacheFile.java
@@ -20,15 +20,16 @@ public class DnsCacheFile implements Recorder {
20
public DnsCacheFile(String directory) throws IOException {
21
this.directory = directory;
22
f = new File(directory);
23
- if (!f.isDirectory() || !f.exists()) {
+
24
+ if (!f.isDirectory()) {
25
+ throw new IOException("does not mkdir");
26
+ }
27
28
+ if (!f.exists()) {
29
boolean r = f.mkdirs();
30
if (!r) {
31
throw new IOException("mkdir failed");
32
}
- return;
- }
- if (!f.isDirectory()) {
- throw new IOException("does not mkdir");
33
34
35
0 commit comments