|
|
|
@ -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 { |
|
|
|
|