Simplification

This commit is contained in:
M66B 2022-10-08 07:51:38 +02:00
parent a2ef375a94
commit 728d5b796c
1 changed files with 2 additions and 4 deletions

View File

@ -156,7 +156,6 @@ import java.util.Locale;
import java.util.Map; import java.util.Map;
import java.util.Objects; import java.util.Objects;
import java.util.concurrent.BlockingQueue; import java.util.concurrent.BlockingQueue;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService; import java.util.concurrent.ExecutorService;
import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.LinkedBlockingQueue;
@ -2237,9 +2236,8 @@ public class Helper {
exists.put(dir, true); exists.put(dir, true);
} }
if (!isUiThread() && !dir.exists()) if (!dir.exists() && !dir.mkdirs())
if (!dir.mkdirs()) throw new IllegalArgumentException("Failed to create=" + dir);
throw new IllegalArgumentException("Failed to create=" + dir);
return dir; return dir;
} }