From 3a202903cc2ee3e36119ce243693e1b3a8eda81a Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Thu, 26 Jul 2018 17:37:50 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-7941=20=E5=AD=90=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E6=9C=89=E5=85=A8=E9=83=A8=E6=9D=83=E9=99=90=E7=88=B6=E7=9B=AE?= =?UTF-8?q?=E5=BD=95=E9=83=A8=E5=88=86=E6=9D=83=E9=99=90=E5=9C=BA=E6=99=AF?= =?UTF-8?q?=E6=97=B6=E6=98=BE=E7=A4=BA=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gui/itree/filetree/TemplateFileTree.java | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateFileTree.java b/designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateFileTree.java index 70f29e48eb..4ac6141c7e 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateFileTree.java +++ b/designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateFileTree.java @@ -222,22 +222,18 @@ public class TemplateFileTree extends EnvFileTree { String fileName = fileNode.getEnvPath(); String[] auPaths = auPath.split(CoreConstants.SEPARATOR); String[] nodePaths = fileName.split(CoreConstants.SEPARATOR); - - if (auPaths.length == nodePaths.length) { + // 待判断目录是有权限目录或者有权限目录的子目录,全部权限 + if (auPaths.length <= nodePaths.length) { for (int i = 0; i < auPaths.length; i++) { if (!auPaths[i].equals(nodePaths[i])) { return false; } } return fileNode.isDirectory(); - } else { - int len = Math.min(auPaths.length, nodePaths.length); - for (int i = 0; i < len; i++) { - if (!auPaths[i].equals(nodePaths[i])) { - return false; - } - } - return true; + } + // 其他情况半权限 + else { + return false; } }