ServerLog shows directories as log files #PL-2065

This commit is contained in:
Yuriy Artamonov 2013-04-25 08:30:03 +00:00
parent f767c555f8
commit 83050e8b6f

View File

@ -47,7 +47,13 @@ public class LogControlImpl implements LogControl {
public List<String> getLogFileNames() {
List<String> filenames = new ArrayList<>();
if (logDir.isDirectory()) {
filenames = Arrays.asList(logDir.list());
File[] files = logDir.listFiles();
if (files != null) {
for (File f : files) {
if (f.isFile())
filenames.add(f.getName());
}
}
}
Collections.sort(filenames);
return filenames;