未验证 提交 bf870134 编写于 作者: I Isaac Mercieca 提交者: GitHub

Updated `SchemaFinder` to take into consideration symbolic links (#1199)

上级 10381ce5
package com.kobylynskyi.graphql.codegen.supplier;
import java.io.IOException;
import java.nio.file.FileVisitOption;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Collections;
......@@ -78,7 +79,11 @@ public class SchemaFinder {
*/
public List<String> findSchemas() throws IOException {
int maxDepth = recursive ? Integer.MAX_VALUE : 1;
try (Stream<Path> paths = Files.find(rootDir, maxDepth, (path, attrs) -> shouldInclude(path))) {
try (
Stream<Path> paths =
Files.find(rootDir, maxDepth, (path, attrs) -> shouldInclude(path), FileVisitOption.FOLLOW_LINKS)
) {
return paths.map(Path::toString).sorted().collect(Collectors.toList());
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册