fix:修正Linux编译。
This commit is contained in:
parent
834b77d74e
commit
208cd56ee3
@ -133,11 +133,15 @@ bool CClient::cancel_task()
|
|||||||
bool CClient::down_one_file(const std::string& id, const std::string& file)
|
bool CClient::down_one_file(const std::string& id, const std::string& file)
|
||||||
{
|
{
|
||||||
down_->cur_remote_id_ = id;
|
down_->cur_remote_id_ = id;
|
||||||
|
#ifdef _WIN32
|
||||||
down_->cur_remote_file_ = CCodec::u8ToGBK(file);
|
down_->cur_remote_file_ = CCodec::u8ToGBK(file);
|
||||||
|
#else
|
||||||
|
down_->cur_remote_file_ = file;
|
||||||
|
#endif
|
||||||
|
|
||||||
fs::path remote_file(ofen::COfPath::normalize(down_->cur_remote_file_));
|
fs::path remote_file(ofen::COfPath::normalize(down_->cur_remote_file_));
|
||||||
down_->cur_file_ = COfPath::to_full(remote_file.filename().string());
|
down_->cur_file_ = COfPath::to_full(remote_file.filename().string());
|
||||||
logger_->warn("Start Down => {} To {}", file, down_->cur_file_);
|
logger_->warn("Start Down => {} To {}", down_->cur_remote_file_, down_->cur_file_);
|
||||||
|
|
||||||
// 请求下载文件
|
// 请求下载文件
|
||||||
std::shared_ptr<CFrameBuffer> buf = std::make_shared<CFrameBuffer>();
|
std::shared_ptr<CFrameBuffer> buf = std::make_shared<CFrameBuffer>();
|
||||||
@ -221,7 +225,11 @@ void CClient::handle_frame(CFrameBuffer* buf)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (real.find("[") == std::string::npos) {
|
if (real.find("[") == std::string::npos) {
|
||||||
|
#ifdef _WIN32
|
||||||
logger_->info("FILE ==> {}", CCodec::u8ToGBK(real));
|
logger_->info("FILE ==> {}", CCodec::u8ToGBK(real));
|
||||||
|
#else
|
||||||
|
logger_->info("FILE ==> {}", real);
|
||||||
|
#endif
|
||||||
task_list_[index]->files.push_back(real);
|
task_list_[index]->files.push_back(real);
|
||||||
} else {
|
} else {
|
||||||
auto a = real.find_first_of("[") + 1;
|
auto a = real.find_first_of("[") + 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user