diff --git a/designer/src/com/fr/design/mainframe/bbs/UserInfoPane.java b/designer/src/com/fr/design/mainframe/bbs/UserInfoPane.java index 5138654887..0b16bbfaba 100644 --- a/designer/src/com/fr/design/mainframe/bbs/UserInfoPane.java +++ b/designer/src/com/fr/design/mainframe/bbs/UserInfoPane.java @@ -4,6 +4,7 @@ package com.fr.design.mainframe.bbs; import com.fr.base.FRContext; +import com.fr.config.DBEnv; import com.fr.config.ServerConfig; import com.fr.design.DesignerEnvManager; import com.fr.design.constants.UIConstants; @@ -78,11 +79,13 @@ public class UserInfoPane extends BasicPane{ GeneralContext.addEnvChangedListener(new EnvChangedListener() { @Override public void envChanged() { - String username = ServerConfig.getInstance().getBbsUsername(); - if (StringUtils.isEmpty(username)){ - markUnSignIn(); - } else { - markSignIn(username); + if (DBEnv.isDBEnvAvailable()) { + String username = ServerConfig.getInstance().getBbsUsername(); + if (StringUtils.isEmpty(username)){ + markUnSignIn(); + } else { + markSignIn(username); + } } } }); diff --git a/designer_base/src/com/fr/design/file/TemplateTreePane.java b/designer_base/src/com/fr/design/file/TemplateTreePane.java index b49ad3bee1..69d5b83579 100644 --- a/designer_base/src/com/fr/design/file/TemplateTreePane.java +++ b/designer_base/src/com/fr/design/file/TemplateTreePane.java @@ -320,7 +320,7 @@ public class TemplateTreePane extends JPanel implements FileOperations { try { fileUtils.moveToTrash(new File[]{new File(StableUtils.pathJoin(nodeFile.getEnvPath(), nodeFile.getPath()))}); //todo 走下这个流程,否则集群下其它节点无法同步删除 - //FRContext.getCurrentEnv().deleteFile(nodeFile.getPath()); + FRContext.getCurrentEnv().deleteFile(nodeFile.getPath()); } catch (IOException e) { FRLogger.getLogger().info(e.getMessage()); FRContext.getCurrentEnv().deleteFile(nodeFile.getPath());