mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 16:27:47 +00:00
Filter name spaces to directories only. Closes #8413
This commit is contained in:
1 parent
51db5f2ff7
commit
82e8d06e54
1 file changed
+1
@@ -167,6 +167,7 @@ public class PathPackResources extends AbstractPackResources
|
||||
{
|
||||
Path root = resolve(type.getDirectory());
|
||||
return Files.walk(root, 1)
|
||||
.filter(Files::isDirectory)
|
||||
.map(path -> root.relativize(path))
|
||||
.filter(path -> path.getNameCount() > 0) // skip the root entry
|
||||
.map(p -> p.toString().replaceAll("/$", "")) // remove the trailing slash, if present
|
||||
|
||||
Reference in new issue
Block a user