Skip to content

Commit bf87013

Browse files
Updated SchemaFinder to take into consideration symbolic links (#1199)
1 parent 10381ce commit bf87013

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main/java/com/kobylynskyi/graphql/codegen/supplier/SchemaFinder.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.kobylynskyi.graphql.codegen.supplier;
22

33
import java.io.IOException;
4+
import java.nio.file.FileVisitOption;
45
import java.nio.file.Files;
56
import java.nio.file.Path;
67
import java.util.Collections;
@@ -78,7 +79,11 @@ public void setExcludedFiles(Set<String> excludedFiles) {
7879
*/
7980
public List<String> findSchemas() throws IOException {
8081
int maxDepth = recursive ? Integer.MAX_VALUE : 1;
81-
try (Stream<Path> paths = Files.find(rootDir, maxDepth, (path, attrs) -> shouldInclude(path))) {
82+
83+
try (
84+
Stream<Path> paths =
85+
Files.find(rootDir, maxDepth, (path, attrs) -> shouldInclude(path), FileVisitOption.FOLLOW_LINKS)
86+
) {
8287
return paths.map(Path::toString).sorted().collect(Collectors.toList());
8388
}
8489
}

0 commit comments

Comments
 (0)