Fix ExplodedDirectoryLocator visiting non-existent paths. Closes #7203

Also, bump modlauncher to 7.0.1 to fix resources.

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
This commit is contained in:
cpw 2020-09-06 19:38:58 -04:00
parent 9051021474
commit 4ff0d246ce
No known key found for this signature in database
GPG key ID: 8EB3DF749553B1B7

View file

@ -92,6 +92,7 @@ public class ExplodedDirectoryLocator implements IModLocator {
}
private void scanIndividualPath(final Path path, Consumer<Path> pathConsumer) {
if (!Files.exists(path)) return;
LOGGER.debug(SCAN, "Scanning exploded target {}", path.toString());
try (Stream<Path> files = Files.find(path, Integer.MAX_VALUE, (p, a) -> p.getNameCount() > 0 && p.getFileName().toString().endsWith(".class"))) {
files.forEach(pathConsumer);