ApkDecoder: moved outDir creating from setOutDir() to decode().

This commit is contained in:
Ryszard Wiśniewski 2010-03-27 19:47:09 +01:00
parent a955495284
commit 901035d240

View File

@ -49,17 +49,18 @@ public class ApkDecoder {
}
public void setOutDir(File outDir) throws AndrolibException {
try {
mOutDir = outDir;
OS.rmdir(outDir);
outDir.mkdirs();
} catch (BrutException ex) {
throw new AndrolibException(ex);
}
mOutDir = outDir;
}
public void decode() throws AndrolibException {
File outDir = getOutDir();
try {
OS.rmdir(outDir);
} catch (BrutException ex) {
throw new AndrolibException(ex);
}
outDir.mkdirs();
switch (mDecodeSources) {
case DECODE_SOURCES_NONE:
mAndrolib.decodeSourcesRaw(mApkFile, outDir);