瀏覽代碼

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

JustryDeng 3 年之前
父節點
當前提交
dd460e568d
共有 1 個文件被更改,包括 4 次插入3 次删除
  1. 4 3
      class-winter-core/src/main/java/winter/com/ideaaedi/classwinter/util/JarUtil.java

+ 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));