aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/github/daneren2005/dsub/util/FileUtil.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/util/FileUtil.java b/app/src/main/java/github/daneren2005/dsub/util/FileUtil.java
index 2495db17..04dc73b7 100644
--- a/app/src/main/java/github/daneren2005/dsub/util/FileUtil.java
+++ b/app/src/main/java/github/daneren2005/dsub/util/FileUtil.java
@@ -484,8 +484,12 @@ public class FileUtil {
// Past 5.0 we can query directly for SD Card
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
for(int i = 0; i < dirs.length; i++) {
- if(dirs[i] != null && Environment.isExternalStorageRemovable(dirs[i])) {
- return dirs[i];
+ try {
+ if (dirs[i] != null && Environment.isExternalStorageRemovable(dirs[i])) {
+ return dirs[i];
+ }
+ } catch (Exception e) {
+ Log.e(TAG, "Failed to check if is external", e);
}
}
}