Ensure directory on background threads

This commit is contained in:
M66B 2022-10-06 22:06:14 +02:00
parent 0ef88ceaa0
commit ec8153ace2
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}