mirror of
https://gitee.com/jmix/cuba.git
synced 2024-12-02 19:27:57 +08:00
ServerLog shows directories as log files #PL-2065
This commit is contained in:
parent
f767c555f8
commit
83050e8b6f
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user