From 7ec1eb777e2185a4cb8b6e7b690cd0e5648ebe37 Mon Sep 17 00:00:00 2001 From: crackleeeessyp <86238500+crackleeeessyp@users.noreply.github.com> Date: Wed, 9 Mar 2022 14:49:48 +0800 Subject: [PATCH] Change MAX_FILENAME_LENGTH to 180 On windows, if we put the apk/dex file on desktop or other path such as `C:\Users\xxxxxx\Desktop\folder\test.apk`. Some dex may produce long file path smali file which cannot handled by Windows application, so shorten the MAX_FILENAME_LENGTH to 180 to make sure that it works in most cases --- util/src/main/java/org/jf/util/ClassFileNameHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/src/main/java/org/jf/util/ClassFileNameHandler.java b/util/src/main/java/org/jf/util/ClassFileNameHandler.java index 700134d42..7d47a6353 100644 --- a/util/src/main/java/org/jf/util/ClassFileNameHandler.java +++ b/util/src/main/java/org/jf/util/ClassFileNameHandler.java @@ -55,7 +55,7 @@ * - append a '#' if an individual path element would otherwise be considered a reserved filename */ public class ClassFileNameHandler { - private static final int MAX_FILENAME_LENGTH = 255; + private static final int MAX_FILENAME_LENGTH = 180; // How many characters to reserve in the physical filename for numeric suffixes // Dex files can currently only have 64k classes, so 5 digits plus 1 for an '#' should // be sufficient to handle the case when every class has a conflicting name