diff --git a/client/client.cpp b/client/client.cpp index b702999..1b48f13 100644 --- a/client/client.cpp +++ b/client/client.cpp @@ -391,6 +391,12 @@ bool CClient::request_update_list(const std::string& param) // 读取list文件 std::string list_file_full = COfPath::to_full(list_file); + + if (fs::is_directory(list_file_full)) { + TLOGE(log_, "{} is a directory, only support file.", list_file_full); + return false; + } + std::ifstream in(list_file_full); if (!in.is_open()) { TLOGE(log_, "Can't Open File:{}", list_file_full); diff --git a/server/server.cpp b/server/server.cpp index 1f23f4d..e56b2fb 100644 --- a/server/server.cpp +++ b/server/server.cpp @@ -97,7 +97,7 @@ void CTcpServer::get_client_list(CFrameBuffer** buf) std::string msg; int index = 1; for (const auto& item : vec) { - msg.append(fmt::format("[{}][{}][{}][{}]", index, item.id_, item.online_time_, item.task_time_)); + msg.append(fmt::format("[{}][{}][{}]", index, item.id_, item.online_time_)); auto files = COfStr::split(item.task_, "|"); for (const auto& file : files) { msg.append("\n" + file);