check:添加上载文件列表时,检查文件是否存在,防止输入错误。

This commit is contained in:
taynpg 2024-12-17 15:36:05 +08:00
parent 208cd56ee3
commit 004d894129

@ -100,6 +100,12 @@ bool CClient::up_task(const std::string& cmd)
auto list = CFileOpr::get_file_list(cmd);
std::string msg;
for (const auto& item : list) {
if (!fs::exists(item)) {
logger_->error("File {} not exist, please check!", item);
return false;
}
if (msg.empty()) {
msg.append(item);
} else {