core: fix used name/path to the deobfuscation map file

(used the same name/path as the APK file, but extension 'jobf')
This commit is contained in:
NeoSpb
2015-05-18 21:03:50 +03:00
parent c923d19bcc
commit 510035b7b7
@@ -30,7 +30,13 @@ public class RenameVisitor extends AbstractVisitor {
@Override
public void init(RootNode root) {
IJadxArgs args = root.getArgs();
File deobfMapFile = new File(args.getOutDir(), "deobf_map.jobf");
final String firstInputFileName = root.getDexNodes().get(0).getInputFile().getFile().getAbsolutePath();
final String inputPath = org.apache.commons.io.FilenameUtils.getFullPathNoEndSeparator(
firstInputFileName);
final String inputName = org.apache.commons.io.FilenameUtils.getBaseName(firstInputFileName);
File deobfMapFile = new File(inputPath, inputName + ".jobf");
deobfuscator = new Deobfuscator(args, root.getDexNodes(), deobfMapFile);
boolean deobfuscationOn = args.isDeobfuscationOn();
if (deobfuscationOn) {