Browse Source

REPORT-145453 【fr-fbp】ssh和ssl的数据连接,去获取密钥等文件时,路径深的时候选择后路径有问题

fbp/master
Destiny.Lin 1 month ago
parent
commit
7dd4fb0f5c
  1. 7
      designer-base/src/main/java/com/fr/design/data/datapane/connect/SshPane.java

7
designer-base/src/main/java/com/fr/design/data/datapane/connect/SshPane.java

@ -25,6 +25,7 @@ import com.fr.file.FILE;
import com.fr.file.FILEChooserPane;
import com.fr.file.filter.ChooseFileFilter;
import com.fr.stable.StringUtils;
import com.fr.stable.project.ProjectConstants;
import com.fr.third.guava.collect.HashBiMap;
import javax.swing.JPanel;
@ -67,6 +68,7 @@ public class SshPane extends BasicPane {
private SimpleCardPane verifyCardPane;
private final UIButton fileChooserButton = new UIButton();
private static final String TRIM = SslUtils.CERTIFICATES + ProjectConstants.FORWARD_SLASH;
private static final String USE_PASSWORD = "usePassword";
private static final String USE_KEY = "useKey";
@ -104,6 +106,11 @@ public class SshPane extends BasicPane {
if (file == null) {
keyPath.setText(StringUtils.EMPTY);
} else {
String path = file.getPath();
if (path.startsWith(TRIM)) {
path = path.substring(TRIM.length());
}
keyPath.setText(path);
keyPath.setText(file.getPath());
}
}

Loading…
Cancel
Save