mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-25 18:15:49 +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++) {
|
||||
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()
|
||||
|
Loading…
Reference in New Issue
Block a user