Explorar o código

bug修复:https://gitee.com/JustryDeng/class-winter/issues/I7EQXO

JustryDeng %!s(int64=3) %!d(string=hai) anos
pai
achega
cb7321fa4c

+ 4 - 3
class-winter-core/src/main/java/winter/com/ideaaedi/classwinter/util/JarUtil.java

@@ -8,9 +8,6 @@ import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import java.nio.charset.StandardCharsets;
 import java.nio.file.attribute.FileTime;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -405,6 +402,10 @@ public final class JarUtil {
         else if (projectPath.contains(Constant.DOT_WAR_WEB_INF)) {
             return projectPath.substring(0, projectPath.indexOf(Constant.DOT_WAR_WEB_INF) + Constant.WAR_SUFFIX.length());
         }
+        // 包含印章的projectPath,不作处理直接返回
+        else if (IOUtil.readFileFromWorkbenchRoot(new File(projectPath), Constant.JVM_ARG_CHECK_FILE) != null) {
+            return projectPath;
+        }
         // war包解压后的WEB-INF目录
         else if (projectPath.contains(Constant.WEB_INF)) {
             return projectPath.substring(0, projectPath.indexOf(Constant.WEB_INF));