Permalink
Browse files

APPNG-2188 log a warning in case folder does not exist

  • Loading branch information...
madness-inc committed Jun 11, 2018
1 parent 244903f commit f485e39bb9017ef784c1383af855b889f301d4d4
Showing with 12 additions and 7 deletions.
  1. +12 −7 appng-search/src/main/java/org/appng/search/indexer/FileSystemProvider.java
@@ -112,13 +112,18 @@ public FileSystemProvider(IndexConfig config, List<String> extensions, long time
ConfigEntry entry = config.getEntry(folder);
File contentFolder = new File(dataDir, folder);
DocumentProducer documentProducer = new DocumentProducer(documentQueueSize,
entry.getAnalyzer().getClass(), "index " + contentFolder.getAbsolutePath());
String language = entry.getLanguage();
numIndexed += indexDirectory(documentProducer, language, contentFolder, dataDir, extensions,
skippedFolders);
producers.add(documentProducer);
if (contentFolder.exists()) {
DocumentProducer documentProducer = new DocumentProducer(documentQueueSize,
entry.getAnalyzer().getClass(), "index " + contentFolder.getAbsolutePath());
String language = entry.getLanguage();
numIndexed += indexDirectory(documentProducer, language, contentFolder, dataDir, extensions,
skippedFolders);
producers.add(documentProducer);
} else {
log.warn("The folder {} does not exist, probably the site property {} is misconfigured!",
contentFolder.getAbsolutePath(), SiteProperties.INDEX_CONFIG);
}
}
}

0 comments on commit f485e39

Please sign in to comment.