Browse Source

Merge pull request #390 in DESIGN/design from ~MATA.LI/designrel:release/10.0 to release/10.0

* commit '494816f7f9ddb8eaa9247c3fb3356873bb5ac5b5':
  REPORT-10750
final/10.0
Mata.Li 6 years ago
parent
commit
a4c36b0e3d
  1. 3
      designer-base/src/main/java/com/fr/design/DesignerEnvManager.java
  2. 3
      designer-base/src/main/java/com/fr/design/env/LocalDesignerWorkspaceInfo.java

3
designer-base/src/main/java/com/fr/design/DesignerEnvManager.java

@ -207,7 +207,8 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
return;
}
String installHome = StableUtils.getInstallHome();
if (installHome != null && !".".equals(installHome)) {
//这里不判断路径是.的情况,放在checkValid方法里面,重新选
if (installHome != null) {
String name = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Engine_DEFAULT");
String envPath = designerEnvManager.getDefaultenvPath(installHome);
designerEnvManager.putEnv(name, LocalDesignerWorkspaceInfo.create(name, envPath));

3
designer-base/src/main/java/com/fr/design/env/LocalDesignerWorkspaceInfo.java vendored

@ -77,7 +77,8 @@ public class LocalDesignerWorkspaceInfo implements DesignerWorkspaceInfo {
@Override
public boolean checkValid(){
File file = new File(this.path);
if(!file.isDirectory() || !ComparatorUtils.equals(file.getName(), "WEB-INF")) {
//判断不是文件夹/路径不在WEB-INF下/代码启动三种情况
if(!file.isDirectory() || !ComparatorUtils.equals(file.getName(), "WEB-INF") || this.path.startsWith(".")) {
return false;
}

Loading…
Cancel
Save