diff --git a/src/main/java/io/github/linwancen/plugin/show/ext/conf/ConfCacheGetUtils.java b/src/main/java/io/github/linwancen/plugin/show/ext/conf/ConfCacheGetUtils.java index 1b6374f..afa8fb7 100644 --- a/src/main/java/io/github/linwancen/plugin/show/ext/conf/ConfCacheGetUtils.java +++ b/src/main/java/io/github/linwancen/plugin/show/ext/conf/ConfCacheGetUtils.java @@ -82,6 +82,7 @@ public class ConfCacheGetUtils { VirtualFile confFile = entry.getKey(); @NotNull String confPath = confFile.getPath(); int level = level(path, confPath); + // no one match or child if (level == 0) { continue; } @@ -108,6 +109,7 @@ public class ConfCacheGetUtils { } } } + // child or other child if (length > paths.length) { return 0; } @@ -123,11 +125,11 @@ public class ConfCacheGetUtils { private static String srcPath(@NotNull String path) { int i = path.indexOf('!'); if (i != -1) { - return path.substring(i + 1); + return path.substring(i + 1) + "resources"; } i = path.indexOf("/resources"); if (i != -1) { - return path.substring(i + "/resources".length()); + return path.substring(i); } return path; }