diff --git a/app/src/main/java/de/k3b/android/util/OsUtils.java b/app/src/main/java/de/k3b/android/util/OsUtils.java index b206c0f3..48c3e24b 100644 --- a/app/src/main/java/de/k3b/android/util/OsUtils.java +++ b/app/src/main/java/de/k3b/android/util/OsUtils.java @@ -73,7 +73,10 @@ public static OSDirectory getRootOSDirectory(OSDirectory factory) { if (root.getChildren().size() == 0) { // on android-5.0 an newer root access is not allowed. // i.e. /storage/emulated/0 - File externalRoot = Environment.getExternalStorageDirectory(); + File externalRoot = new File("/storage"); + if (externalRoot.listFiles().length == 0) { + externalRoot = Environment.getExternalStorageDirectory(); + } if (externalRoot != null) { root = createOsDirectory(externalRoot, factory); }