mirror of
https://github.com/revanced/Apktool.git
synced 2024-12-05 02:22:55 +01:00
fix: create directory if doesn't exist, before error
This commit is contained in:
parent
d1b0025c4e
commit
2e75f7b799
@ -924,17 +924,6 @@ final public class AndrolibResources {
|
||||
} else {
|
||||
path = parentPath.getAbsolutePath() + String.format("%1$s.local%1$sshare%1$sapktool%1$sframework", File.separatorChar);
|
||||
}
|
||||
|
||||
File fullPath = new File(path);
|
||||
|
||||
if (! fullPath.canWrite()) {
|
||||
LOGGER.severe(String.format("WARNING: Could not write to (%1$s), using %2$s instead...",
|
||||
fullPath.getAbsolutePath(), System.getProperty("java.io.tmpdir")));
|
||||
LOGGER.severe("Please be aware this is a volatile directory and frameworks could go missing, " +
|
||||
"please utilize --frame-path if the default storage directory is unavailable");
|
||||
|
||||
path = new File(System.getProperty("java.io.tmpdir")).getAbsolutePath();
|
||||
}
|
||||
}
|
||||
|
||||
File dir = new File(path);
|
||||
@ -956,6 +945,17 @@ final public class AndrolibResources {
|
||||
}
|
||||
}
|
||||
|
||||
if (apkOptions.frameworkFolderLocation == null) {
|
||||
if (! dir.canWrite()) {
|
||||
LOGGER.severe(String.format("WARNING: Could not write to (%1$s), using %2$s instead...",
|
||||
dir.getAbsolutePath(), System.getProperty("java.io.tmpdir")));
|
||||
LOGGER.severe("Please be aware this is a volatile directory and frameworks could go missing, " +
|
||||
"please utilize --frame-path if the default storage directory is unavailable");
|
||||
|
||||
dir = new File(System.getProperty("java.io.tmpdir"));
|
||||
}
|
||||
}
|
||||
|
||||
mFrameworkDirectory = dir;
|
||||
return dir;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user