diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/LogServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/LogServiceImpl.java index 3aad0035..47ca3ac5 100644 --- a/src/main/java/com/genersoft/iot/vmp/service/impl/LogServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/service/impl/LogServiceImpl.java @@ -24,7 +24,7 @@ public class LogServiceImpl implements ILogService { @Override public List queryList(String query, String startTime, String endTime) { File logFile = getLogDir(); - if (logFile == null && !logFile.exists()) { + if (logFile == null || !logFile.exists()) { throw new ControllerException(ErrorCode.ERROR100.getCode(), "获取日志文件目录失败"); } File[] files = logFile.listFiles();