Skip to content

Commit 66aa6e7

Browse files
authored
Merge pull request Konloch#196 from martoreto/patch-2
Fixed dex2jar with filenames containing dex or apk
2 parents 655a800 + 676a4f4 commit 66aa6e7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/the/bytecode/club/bytecodeviewer/Dex2Jar.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public class Dex2Jar {
3737
public static synchronized void dex2Jar(File input, File output) {
3838
try {
3939
com.googlecode.dex2jar.tools.Dex2jarCmd.main(new String[]{input.getAbsolutePath()});
40-
String realOutput = input.getName().replaceAll(".dex", "-dex2jar.jar").replaceAll(".apk", "-dex2jar.jar");
40+
String realOutput = input.getName().replaceAll("\\.dex", "-dex2jar.jar").replaceAll("\\.apk", "-dex2jar.jar");
4141
File realOutputF = new File(realOutput);
4242
realOutputF.renameTo(output);
4343
File realOutputF2 = new File(realOutput);
@@ -57,7 +57,7 @@ public static synchronized void dex2Jar(File input, File output) {
5757
public static synchronized void saveAsDex(File input, File output) {
5858
try {
5959
com.googlecode.dex2jar.tools.Jar2Dex.main(new String[]{input.getAbsolutePath()});
60-
String realOutput = input.getName().replaceAll(".jar", "-jar2dex.dex");
60+
String realOutput = input.getName().replaceAll("\\.jar", "-jar2dex.dex");
6161
File realOutputF = new File(realOutput);
6262
realOutputF.renameTo(output);
6363
File realOutputF2 = new File(realOutput);

0 commit comments

Comments
 (0)