fix mkdir exception

This commit is contained in:
327135569 2021-06-15 21:16:17 +08:00
parent 80b8dd8760
commit 5324ccfeb3
2 changed files with 5 additions and 3 deletions

View File

@ -50,7 +50,7 @@ public class SoAndDexCopyTask implements Runnable {
}
if (existLibPathArray.isEmpty()) {
System.out.println("Target app dont have any so in \"lib/{eabi}\" dir, so create default \"armeabi-v7a\"");
System.out.println("Target app dont have any so in \"lib/\" dir, so create default \"armeabi-v7a\"");
String libPath = APK_LIB_PATH_ARRAY[0];
String apkSoFullPath = fullLibPath(libPath);
File apkSoFullPathFile = new File(apkSoFullPath);

View File

@ -53,8 +53,10 @@ public class FileUtils {
File file = new File(outPath);
if (entry.isDirectory()) {
if (!file.mkdirs()) {
throw new IllegalStateException("mkdir fail " + file.getAbsolutePath());
if (!file.exists()) {
if (!file.mkdirs()) {
throw new IllegalStateException("mkdir fail " + file.getAbsolutePath());
}
}
continue;
}