Fix exploded directory locator to actually scan all paths for a file.
This commit is contained in:
parent
0d3f28bd52
commit
755eff7415
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue