Skip to content

Commit 8184212

Browse files
committed
Yaml Model Repository: skip non-existent paths during the initial scan instead of logging a warning
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
1 parent ff11565 commit 8184212

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

bundles/org.openhab.core.model.yaml/src/main/java/org/openhab/core/model/yaml/internal/YamlModelRepositoryImpl.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ public YamlModelRepositoryImpl(@Reference(target = WatchService.CONFIG_WATCHER_F
130130
// read initial contents
131131
WATCHED_PATHS.forEach(watchPath -> {
132132
Path fullPath = mainWatchPath.resolve(watchPath);
133+
if (!Files.exists(fullPath) || !Files.isDirectory(fullPath)) {
134+
return;
135+
}
133136
try {
134137
Files.walkFileTree(fullPath, new SimpleFileVisitor<>() {
135138
@Override

0 commit comments

Comments
 (0)