Browse Source

REPORT-101060 【版本管理三期】删除无权限的版本,能删除成功

release/11.0
Destiny.Lin 1 year ago
parent
commit
583cfd91cc
  1. 8
      designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java

8
designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java

@ -407,9 +407,11 @@ public class TemplateTreePane extends JPanel implements FileOperations {
if (node instanceof FileNode) {
FileNodeFILE nodeFILE = new FileNodeFILE((FileNode) node);
if (nodeFILE.exists()) {
WorkContext.getCurrent().get(VcsOperator.class).recycleVersion(
VcsHelper.getInstance().getCurrentUsername(),
VcsHelper.getInstance().dealWithFilePath(((FileNode) node).getEnvPath()));
try {
WorkContext.getCurrent().get(VcsOperator.class).recycleVersion(VcsHelper.getInstance().getCurrentUsername(), VcsHelper.getInstance().dealWithFilePath(((FileNode) node).getEnvPath()));
} catch (Exception e) {
return false;
}
if (TemplateResourceManager.getResource().delete(nodeFILE)) {
HistoryTemplateListCache.getInstance().deleteFile(nodeFILE);
} else {

Loading…
Cancel
Save