Merge branch 'dk_updater_fix'

This commit is contained in:
David Kocik 2023-01-30 13:24:04 +01:00
commit 61cc46fc03

View File

@ -2,18 +2,20 @@
#include <atomic> #include <atomic>
#include <thread> #include <thread>
#include <string>
#include <boost/filesystem.hpp> #include <boost/filesystem.hpp>
#include <boost/log/trivial.hpp> #include <boost/log/trivial.hpp>
#include <boost/nowide/fstream.hpp> #include <boost/nowide/fstream.hpp>
#include <boost/nowide/convert.hpp> #include <boost/nowide/convert.hpp>
#include <boost/property_tree/ini_parser.hpp> #include <boost/property_tree/ini_parser.hpp>
#include <curl/curl.h> #include <curl/curl.h>
#include "slic3r/GUI/format.hpp" #include "slic3r/GUI/format.hpp"
#include "slic3r/GUI/GUI_App.hpp" #include "slic3r/GUI/GUI_App.hpp"
#include "slic3r/GUI/GUI.hpp" #include "slic3r/GUI/GUI.hpp"
#include "slic3r/GUI/I18N.hpp" #include "slic3r/GUI/I18N.hpp"
#include "slic3r/GUI/GLCanvas3D.hpp"
#include "slic3r/Utils/Http.hpp" #include "slic3r/Utils/Http.hpp"
#include "libslic3r/Utils.hpp" #include "libslic3r/Utils.hpp"
@ -214,7 +216,7 @@ boost::filesystem::path AppUpdater::priv::download_file(const DownloadAppData& d
} }
boost::filesystem::path tmp_path = dest_path; boost::filesystem::path tmp_path = dest_path;
tmp_path += format(".%1%%2%", get_current_pid(), ".download"); tmp_path += format(".%1%%2%", std::to_string(GUI::GLCanvas3D::timestamp_now()), ".download");
FILE* file; FILE* file;
wxString temp_path_wstring(tmp_path.wstring()); wxString temp_path_wstring(tmp_path.wstring());
file = fopen(temp_path_wstring.c_str(), "wb"); file = fopen(temp_path_wstring.c_str(), "wb");