From 9b8af77bcf879a67a52c0684b75e4e98108413b4 Mon Sep 17 00:00:00 2001 From: taynpg Date: Fri, 10 Jan 2025 22:17:49 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E6=AD=A3=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E6=96=87=E4=BB=B6=E5=A4=B9=E6=9C=AA=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/client.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/client/client.cpp b/client/client.cpp index 8f7601b..1c9354d 100644 --- a/client/client.cpp +++ b/client/client.cpp @@ -179,7 +179,12 @@ bool CClient::up_task(const std::string& param) for (const auto& item : list) { if (!fs::exists(item)) { - logger_->error("File {} not exist, please check!", item); + logger_->error("File {} not exist, please check.", item); + return false; + } + + if (!fs::is_regular_file(item)) { + logger_->error("Only Support Up File, But directory.", item); return false; }