|
|
@ -222,22 +222,18 @@ public class TemplateFileTree extends EnvFileTree { |
|
|
|
String fileName = fileNode.getEnvPath(); |
|
|
|
String fileName = fileNode.getEnvPath(); |
|
|
|
String[] auPaths = auPath.split(CoreConstants.SEPARATOR); |
|
|
|
String[] auPaths = auPath.split(CoreConstants.SEPARATOR); |
|
|
|
String[] nodePaths = fileName.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++) { |
|
|
|
for (int i = 0; i < auPaths.length; i++) { |
|
|
|
if (!auPaths[i].equals(nodePaths[i])) { |
|
|
|
if (!auPaths[i].equals(nodePaths[i])) { |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return fileNode.isDirectory(); |
|
|
|
return fileNode.isDirectory(); |
|
|
|
} else { |
|
|
|
} |
|
|
|
int len = Math.min(auPaths.length, nodePaths.length); |
|
|
|
// 其他情况半权限
|
|
|
|
for (int i = 0; i < len; i++) { |
|
|
|
else { |
|
|
|
if (!auPaths[i].equals(nodePaths[i])) { |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|