Fix datapack walking not working for mod datapacks. Closes #5334 (#5335)

This commit is contained in:
Vincent Lee authored and LexManos committed 2019-01-09 20:59:40 -08:00
1 parent 4e196a445a
commit 985a48f02e
1 file changed
+2 -1
@@ -79,7 +79,8 @@ public class ModFileResourcePack extends AbstractResourcePack
try
{
Path root = modFile.getLocator().findPath(modFile, type.getDirectoryName()).toAbsolutePath();
Path inputPath = root.resolve(pathIn);
Path inputPath = root.getFileSystem().getPath(pathIn);
return Files.walk(root).
map(path -> root.relativize(path.toAbsolutePath())).
filter(path -> path.getNameCount() > 1 && path.getNameCount() - 1 <= maxDepth). // Make sure the depth is within bounds, ignoring domain