Browse Source

Update RNFetchBlobFS.java

ihavenoface5 5 years ago
parent
commit
b8e0dff388
No account linked to committer's email address
1 changed files with 4 additions and 2 deletions
  1. 4
    2
      android/src/main/java/com/RNFetchBlob/RNFetchBlobFS.java

+ 4
- 2
android/src/main/java/com/RNFetchBlob/RNFetchBlobFS.java View File

@@ -416,7 +416,7 @@ class RNFetchBlobFS {
416 416
             File dest = new File(path);
417 417
             File dir = dest.getParentFile();
418 418
 
419
-            if(!dest.exists()) {
419
+            if(!dest.)()) {
420 420
                 if(dir != null && !dir.exists()) {
421 421
                     if (!dir.mkdirs()) {
422 422
                         callback.invoke("ENOTDIR", "Failed to create parent directory of '" + path + "'");
@@ -671,7 +671,9 @@ class RNFetchBlobFS {
671 671
                 boolean isDir = new File(path).isDirectory();
672 672
                 callback.invoke(exist, isDir);
673 673
             }
674
-            callback.invoke(false, false);
674
+            else {
675
+                callback.invoke(false, false);
676
+            }
675 677
         }
676 678
     }
677 679