mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-27 03:15:39 +01:00
Ensure exists directory
This commit is contained in:
@@ -340,9 +340,7 @@ public class ContactInfo {
|
||||
final String domain = d.toLowerCase(Locale.ROOT);
|
||||
final String email = info.email.toLowerCase(Locale.ROOT);
|
||||
|
||||
File dir = new File(context.getFilesDir(), "favicons");
|
||||
if (!dir.exists())
|
||||
dir.mkdir();
|
||||
File dir = Helper.ensureExists(new File(context.getFilesDir(), "favicons"));
|
||||
|
||||
try {
|
||||
// check cache
|
||||
@@ -511,10 +509,7 @@ public class ContactInfo {
|
||||
// Generated
|
||||
boolean identicon = false;
|
||||
if (info.bitmap == null && generated && !TextUtils.isEmpty(info.email)) {
|
||||
File dir = new File(context.getFilesDir(), "generated");
|
||||
if (!dir.exists())
|
||||
dir.mkdir();
|
||||
|
||||
File dir = Helper.ensureExists(new File(context.getFilesDir(), "generated"));
|
||||
File[] files = dir.listFiles(new FilenameFilter() {
|
||||
@Override
|
||||
public boolean accept(File file, String name) {
|
||||
|
||||
Reference in New Issue
Block a user