Skip to content

Commit 876ec8a

Browse files
committed
Fix workspace directory scan
Signed-off-by: Ben Sherman <[email protected]>
1 parent a0d3523 commit 876ec8a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/main/java/nextflow/lsp/services/LanguageService.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,11 @@ protected Set<URI> getWorkspaceFiles(String rootUri) {
146146
var result = new HashSet<URI>();
147147
PathUtils.visitFiles(
148148
Path.of(URI.create(rootUri)),
149-
(path) -> (Files.isDirectory(path) || matchesFile(path.toString())) && !PathUtils.isExcluded(path, configuration.excludePatterns()),
150-
(path) -> result.add(path.toUri()));
149+
(path) -> !PathUtils.isExcluded(path, configuration.excludePatterns()),
150+
(path) -> {
151+
if( matchesFile(path.toString()) )
152+
result.add(path.toUri());
153+
});
151154
return result;
152155
}
153156
catch( IOException e ) {

0 commit comments

Comments
 (0)