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

This commit is contained in:
Vincent Lee 2019-01-09 22:59:40 -06:00 committed by LexManos
parent 4e196a445a
commit 985a48f02e
1 changed files with 2 additions and 1 deletions

View File

@ -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