Skip to content

Commit f280555

Browse files
committed
fix: Improve file watching logic to watch files instead of directories
1 parent 4277a9c commit f280555

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

moqu/deployment/src/main/java/io/quarkiverse/openapi/generator/MoquProjectProcessor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ MoquProjectBuildItem generate(MoquConfig config) {
7373
void watchOpenApiFiles(MoquConfig config, BuildProducer<HotDeploymentWatchedFileBuildItem> watchedPaths)
7474
throws IOException {
7575
ClassPathUtils.consumeAsPaths(config.resourceDir(), path -> {
76-
if (Files.isDirectory(path)) {
77-
watchedPaths.produce(new HotDeploymentWatchedFileBuildItem(path.toString(), true));
76+
if (Files.exists(path)) {
77+
watchedPaths.produce(new HotDeploymentWatchedFileBuildItem(path.toString(), Files.isDirectory(path)));
7878
}
7979
});
8080
}

0 commit comments

Comments
 (0)