Fixed http log file census for probing.

This commit is contained in:
Christian P. MOMON 2021-05-25 21:41:21 +02:00
parent 345ec7aba5
commit 18bed6289d

View file

@ -26,6 +26,7 @@ import java.util.Locale;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -218,7 +219,7 @@ public class HttpErrorLogAnalyzer
String prefix = source.substring(0, source.length() - 1); String prefix = source.substring(0, source.length() - 1);
for (File file : new File(prefix).getParentFile().listFiles()) for (File file : new File(prefix).getParentFile().listFiles())
{ {
if (file.getName().startsWith(prefix)) if (file.getName().startsWith(FilenameUtils.getName(prefix)))
{ {
analyzer.probe(file); analyzer.probe(file);
} }