Skip to content

Commit 781d2ee

Browse files
committed
Directories can get deleted
1 parent b2b78d3 commit 781d2ee

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎src/main/java/org/javacs/Parser.java‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,11 @@ List<TreePath> run() {
154154

155155
/** Search `dir` for .java files containing important symbols matching `query` */
156156
static Stream<TreePath> findSymbols(Path dir, String query) {
157+
if (!Files.exists(dir)) {
158+
LOG.warning(dir + " does not exist");
159+
return Stream.empty();
160+
}
161+
157162
var match = FileSystems.getDefault().getPathMatcher("glob:*.java");
158163

159164
try {

0 commit comments

Comments
 (0)