From 75a75bb776069cf30596bee87c700017e32a9c7d Mon Sep 17 00:00:00 2001 From: alves Date: Wed, 25 Feb 2026 19:15:59 +0800 Subject: [PATCH] fix data invalid bug. --- src/slic3r/Utils/PresetUpdater.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/slic3r/Utils/PresetUpdater.cpp b/src/slic3r/Utils/PresetUpdater.cpp index 5a63091190..9ba542d878 100644 --- a/src/slic3r/Utils/PresetUpdater.cpp +++ b/src/slic3r/Utils/PresetUpdater.cpp @@ -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) { 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) { BOOST_LOG_TRIVIAL(error) << "Download failed with HTTP status: " << http_status; return; @@ -707,7 +707,7 @@ bool PresetUpdater::priv::download_file(const std::string& url, } extract_file(target_path, extract_path); BOOST_LOG_TRIVIAL(info) << "Download completed: " << target_path; - res = true; + }) .timeout_max(timeout_sec) .perform();