Merge "Don't try to index empty documentation txt files"

This commit is contained in:
Shawn Pearce
2014-05-01 19:56:55 +00:00
committed by Gerrit Code Review

View File

@@ -104,6 +104,9 @@ public class DocIndexer {
IndexWriter iwriter = new IndexWriter(directory, config);
for (String inputFile : inputFiles) {
File file = new File(inputFile);
if (file.length() == 0) {
continue;
}
BufferedReader titleReader = new BufferedReader(
new InputStreamReader(new FileInputStream(file), "UTF-8"));