mirror of https://github.com/M66B/FairEmail.git
Ensure directory on background threads
This commit is contained in:
parent
0ef88ceaa0
commit
ec8153ace2
|
@ -2237,9 +2237,9 @@ public class Helper {
|
|||
exists.put(dir, true);
|
||||
}
|
||||
|
||||
if (!dir.exists())
|
||||
if (!isUiThread() && !dir.exists())
|
||||
if (!dir.mkdirs())
|
||||
Log.e("Cannot create directory=" + dir);
|
||||
throw new IllegalArgumentException("Failed to create=" + dir);
|
||||
|
||||
return dir;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue