Browse Source

Merge pull request #11190 in DESIGN/design from bugfix/11.0 to feature/x

* commit 'e538bc0026db40c21f4c86746d048ea9a87b23fd':
  REPORT-87843 复制特定文件夹名称,“的副本”后缀位置异常
  REPORT-87787 新增启动报错, File not exists:/com/fr/design/images/platform/platform
feature/x
superman 2 years ago
parent
commit
36fac36fb6
  1. 21
      designer-base/src/main/java/com/fr/design/file/FileOperationHelper.java
  2. 2
      designer-base/src/main/java/com/fr/design/mainframe/platform/ServicePlatformAction.java

21
designer-base/src/main/java/com/fr/design/file/FileOperationHelper.java

@ -127,7 +127,7 @@ public class FileOperationHelper {
WARNING_MESSAGE); WARNING_MESSAGE);
return StringUtils.EMPTY; return StringUtils.EMPTY;
} }
String name = getNoRepeatedName4Paste(targetDir, sourceFile.getName()); String name = getNoRepeatedName4Paste(targetDir, sourceFile);
String targetFile = StableUtils.pathJoin(targetDir, name); String targetFile = StableUtils.pathJoin(targetDir, name);
if (sourceFile.isDirectory()) { if (sourceFile.isDirectory()) {
copyDir(sourcePath, targetFile, withCopyVcs); copyDir(sourcePath, targetFile, withCopyVcs);
@ -177,19 +177,22 @@ public class FileOperationHelper {
* 重名处理 * 重名处理
* *
* @param targetDir * @param targetDir
* @param oldName * @param sourceFile
* @return * @return
*/ */
private String getNoRepeatedName4Paste(String targetDir, String oldName) { private String getNoRepeatedName4Paste(String targetDir, FileNode sourceFile) {
String oldName = sourceFile.getName();
while (isNameRepeaded(targetDir, oldName)) { while (isNameRepeaded(targetDir, oldName)) {
int index = oldName.lastIndexOf("."); if (sourceFile.isDirectory()) {
if (index > 0) {
String oName = oldName.substring(0, index);
oName = oName + Toolkit.i18nText("Fine-Design_Table_Data_Copy_Of_Table_Data");
oldName = oName.concat(oldName.substring(index));
} else {
//目录重名 //目录重名
oldName = oldName + Toolkit.i18nText("Fine-Design_Table_Data_Copy_Of_Table_Data"); oldName = oldName + Toolkit.i18nText("Fine-Design_Table_Data_Copy_Of_Table_Data");
} else {
int index = oldName.lastIndexOf(".");
if (index > 0) {
String oName = oldName.substring(0, index);
oName = oName + Toolkit.i18nText("Fine-Design_Table_Data_Copy_Of_Table_Data");
oldName = oName.concat(oldName.substring(index));
}
} }
} }
return oldName; return oldName;

2
designer-base/src/main/java/com/fr/design/mainframe/platform/ServicePlatformAction.java

@ -20,7 +20,7 @@ import java.net.URI;
public class ServicePlatformAction extends UpdateAction { public class ServicePlatformAction extends UpdateAction {
public ServicePlatformAction() { public ServicePlatformAction() {
this.setName(Toolkit.i18nText("Fine-Design_Basic_Service_Platform_Title")); this.setName(Toolkit.i18nText("Fine-Design_Basic_Service_Platform_Title"));
this.setSmallIcon("/com/fr/design/images/platform/platform"); this.setSmallIcon("/com/fr/design/images/platform/platform", false);
} }
@Override @Override

Loading…
Cancel
Save