|
@@ -604,7 +604,11 @@ class RNFetchBlobFS {
|
604
|
604
|
File dir = new File(dest);
|
605
|
605
|
if (!dir.exists())
|
606
|
606
|
{
|
607
|
|
- dir.mkdirs();
|
|
607
|
+ if (!dir.mkdirs())
|
|
608
|
+ {
|
|
609
|
+ callback.invoke("Output directory creation failed.");
|
|
610
|
+ return;
|
|
611
|
+ }
|
608
|
612
|
}
|
609
|
613
|
|
610
|
614
|
try {
|
|
@@ -622,7 +626,7 @@ class RNFetchBlobFS {
|
622
|
626
|
|
623
|
627
|
src.delete(); //remove original file
|
624
|
628
|
} catch (FileNotFoundException exception) {
|
625
|
|
- callback.invoke(exception.toString());
|
|
629
|
+ callback.invoke("Source file not found.");
|
626
|
630
|
return;
|
627
|
631
|
} catch (Exception e) {
|
628
|
632
|
callback.invoke(e.toString());
|