mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-29 05:42:33 +00:00
fix data invalid bug.
This commit is contained in:
@@ -681,7 +681,7 @@ bool PresetUpdater::priv::download_file(const std::string& url,
|
|||||||
.on_error([&url](std::string body, std::string error, unsigned http_status) {
|
.on_error([&url](std::string body, std::string error, unsigned http_status) {
|
||||||
BOOST_LOG_TRIVIAL(error) << "Download failed: " << url << ", HTTP status: " << http_status << ", error: " << error;
|
BOOST_LOG_TRIVIAL(error) << "Download failed: " << url << ", HTTP status: " << http_status << ", error: " << error;
|
||||||
})
|
})
|
||||||
.on_complete([&](std::string body, unsigned http_status) {
|
.on_complete([&, target_path, extract_path, tmp_path](std::string body, unsigned http_status) {
|
||||||
if (http_status != 200) {
|
if (http_status != 200) {
|
||||||
BOOST_LOG_TRIVIAL(error) << "Download failed with HTTP status: " << http_status;
|
BOOST_LOG_TRIVIAL(error) << "Download failed with HTTP status: " << http_status;
|
||||||
return;
|
return;
|
||||||
@@ -707,7 +707,7 @@ bool PresetUpdater::priv::download_file(const std::string& url,
|
|||||||
}
|
}
|
||||||
extract_file(target_path, extract_path);
|
extract_file(target_path, extract_path);
|
||||||
BOOST_LOG_TRIVIAL(info) << "Download completed: " << target_path;
|
BOOST_LOG_TRIVIAL(info) << "Download completed: " << target_path;
|
||||||
res = true;
|
|
||||||
})
|
})
|
||||||
.timeout_max(timeout_sec)
|
.timeout_max(timeout_sec)
|
||||||
.perform();
|
.perform();
|
||||||
|
|||||||
Reference in New Issue
Block a user