File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
common/src/main/java/org/embeddedt/modernfix/resources Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -147,9 +147,17 @@ private static boolean isValidCachedResourcePath(Path path) {
147147
148148 public Set <String > getNamespaces (PackType type ) {
149149 awaitLoad ();
150- if (PackTypeHelper .isVanillaPackType (type ))
151- return this .root .getChild (type .getDirectory ()).children .keySet ();
152- else
150+ if (PackTypeHelper .isVanillaPackType (type )) {
151+ var namespaceToNodeMap = this .root .getChild (type .getDirectory ()).children ;
152+ var results = new ObjectOpenHashSet <String >();
153+ for (var entry : namespaceToNodeMap .entrySet ()) {
154+ // Entries without children are files, not folders
155+ if (!entry .getValue ().children .isEmpty ()) {
156+ results .add (entry .getKey ());
157+ }
158+ }
159+ return results ;
160+ } else
153161 return null ;
154162 }
155163
You can’t perform that action at this time.
0 commit comments