|
@@ -213,7 +213,11 @@ public class RNFetchBlobFS {
|
213
|
213
|
state = Environment.getExternalStorageState();
|
214
|
214
|
if (state.equals(Environment.MEDIA_MOUNTED)) {
|
215
|
215
|
res.put("SDCardDir", Environment.getExternalStorageDirectory().getAbsolutePath());
|
216
|
|
- res.put("SDCardApplicationDir", ctx.getExternalFilesDir(null).getParentFile().getAbsolutePath());
|
|
216
|
+
|
|
217
|
+ File externalDirectory = ctx.getExternalFilesDir(null);
|
|
218
|
+ if (externalDirectory != null) {
|
|
219
|
+ res.put("SDCardApplicationDir", externalDirectory.getParentFile().getAbsolutePath());
|
|
220
|
+ }
|
217
|
221
|
}
|
218
|
222
|
res.put("MainBundleDir", ctx.getApplicationInfo().dataDir);
|
219
|
223
|
return res;
|