1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-26 02:25:50 +01:00
Now that is a really crappy API in Android that returns an array with null values.

closes #167
This commit is contained in:
cpfeiffer 2015-11-18 23:17:28 +01:00
parent ea98e207d9
commit 1e6db708d2

View File

@ -97,7 +97,7 @@ public class FileUtils {
}
for (int i = 0; i < dirs.length; i++) {
File dir = dirs[i];
if (!dir.exists() && !dir.mkdirs()) {
if (dir == null || (!dir.exists() && !dir.mkdirs())) {
continue;
}
// the first directory is also the primary external storage, i.e. the same as Environment.getExternalFilesDir()