1.18 effect at previous layer when folder named -1 | 文件夹名为 -1 时配置在上一层文件夹生效
This commit is contained in:
@@ -98,6 +98,15 @@ class ConfCacheGetUtils {
|
||||
String[] paths = StringUtils.split(path, '/');
|
||||
String[] confPaths = StringUtils.split(confPath, '/');
|
||||
int length = confPaths.length;
|
||||
String lastFolder = confPaths[length - 2];
|
||||
if (lastFolder.startsWith("-")) {
|
||||
try {
|
||||
int i = Integer.parseInt(lastFolder);
|
||||
length = length + i - 1;
|
||||
} catch (NumberFormatException e) {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
if (length > paths.length) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user