Fix exploded directory locator to actually scan all paths for a file.

This commit is contained in:
cpw 2019-01-15 22:14:23 -05:00
parent 0d3f28bd52
commit 755eff7415

View file

@ -76,7 +76,8 @@ public class ExplodedDirectoryLocator implements IModLocator {
Path found = mods.get(modFile).getLeft().resolve(target);
if (Files.exists(found)) return found;
// then try left path (classes)
return mods.get(modFile).getRight().stream().map(p->p.resolve(target)).findFirst().orElse(found.resolve(target));
return mods.get(modFile).getRight().stream().map(p->p.resolve(target)).filter(Files::exists).
findFirst().orElse(found.resolve(target));
}
@Override