Skip to content

Commit

Permalink
#169: Allow Media Scanner to scan external sdcard and usb stick if mo…
Browse files Browse the repository at this point in the history
…unted under storage
  • Loading branch information
k3b committed Mar 24, 2020
1 parent e16f142 commit a42652e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/src/main/java/de/k3b/android/util/OsUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit a42652e

Please sign in to comment.