mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-25 16:15:55 +01:00
Fix NPE.
Now that is a really crappy API in Android that returns an array with null values. closes #167
This commit is contained in:
parent
ea98e207d9
commit
1e6db708d2
@ -97,7 +97,7 @@ public class FileUtils {
|
|||||||
}
|
}
|
||||||
for (int i = 0; i < dirs.length; i++) {
|
for (int i = 0; i < dirs.length; i++) {
|
||||||
File dir = dirs[i];
|
File dir = dirs[i];
|
||||||
if (!dir.exists() && !dir.mkdirs()) {
|
if (dir == null || (!dir.exists() && !dir.mkdirs())) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// the first directory is also the primary external storage, i.e. the same as Environment.getExternalFilesDir()
|
// the first directory is also the primary external storage, i.e. the same as Environment.getExternalFilesDir()
|
||||||
|
Loading…
Reference in New Issue
Block a user