From edb3e15426a1fb68f4e88a7315097577a16da2ba Mon Sep 17 00:00:00 2001 From: taynpg Date: Thu, 16 Jan 2025 09:19:39 +0800 Subject: [PATCH] =?UTF-8?q?appro=EF=BC=9A=E4=BC=98=E5=8C=96update=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/settings.json | 2 +- client/client.cpp | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index cb7812b..247350a 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -21,7 +21,7 @@ ], "visualizerFile": "${workspaceRoot}/.vscode/qt5.natvis", "args": [ - "-n", "2" + "-n", "1" ] }, "cmake.environment": { diff --git a/client/client.cpp b/client/client.cpp index ec5d5b5..6efb039 100644 --- a/client/client.cpp +++ b/client/client.cpp @@ -376,8 +376,17 @@ bool CClient::request_update_list(const std::string& param) std::string handled_content; for (const auto& item : vec) { std::string hitem = COfStr::trim(item); + if (hitem.empty()) { + continue; + } + logger_->info("---> check {}", hitem); auto v = COfStr::split(hitem, "|"); if (v.size() >= 2) { + if (!fs::exists(v[0])) { + logger_->error("file {} not exist.", v[0]); + valid = false; + break; + } handled_content.append(hitem + "\n"); continue; }