Merge branch 'master' of https://github.com/Prusa-Development/PrusaSlicerPrivate
This commit is contained in:
commit
23e7945a38
@ -1447,9 +1447,12 @@ bool PageDownloader::on_finish_downloader() const
|
||||
|
||||
bool DownloaderUtils::Worker::perform_register()
|
||||
{
|
||||
//boost::filesystem::path chosen_dest/*(path_text_ctrl->GetValue());*/(boost::nowide::narrow(path_text_ctrl->GetValue()));
|
||||
boost::filesystem::path chosen_dest (GUI::format(path_name()));
|
||||
boost::filesystem::path aux_dest (GUI::into_u8(path_name()));
|
||||
boost::system::error_code ec;
|
||||
boost::filesystem::path chosen_dest = boost::filesystem::absolute(aux_dest, ec);
|
||||
if(ec)
|
||||
chosen_dest = aux_dest;
|
||||
ec.clear();
|
||||
if (chosen_dest.empty() || !boost::filesystem::is_directory(chosen_dest, ec) || ec) {
|
||||
std::string err_msg = GUI::format("%1%\n\n%2%",_L("Chosen directory for downloads does not Exists.") ,chosen_dest.string());
|
||||
BOOST_LOG_TRIVIAL(error) << err_msg;
|
||||
|
@ -9,6 +9,8 @@
|
||||
#include <iostream>
|
||||
|
||||
#include "format.hpp"
|
||||
#include "GUI.hpp"
|
||||
#include "I18N.hpp"
|
||||
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
@ -168,7 +170,14 @@ void FileGet::priv::get_perform()
|
||||
else
|
||||
file = fopen(temp_path_wstring.c_str(), "ab");
|
||||
|
||||
assert(file != NULL);
|
||||
//assert(file != NULL);
|
||||
if (file == NULL) {
|
||||
wxCommandEvent* evt = new wxCommandEvent(EVT_DWNLDR_FILE_ERROR);
|
||||
evt->SetString(GUI::format_wxstr(_L("Can't create file at %1%."), temp_path_wstring));
|
||||
evt->SetInt(m_id);
|
||||
m_evt_handler->QueueEvent(evt);
|
||||
return;
|
||||
}
|
||||
|
||||
std:: string range_string = std::to_string(m_written) + "-";
|
||||
|
||||
@ -244,7 +253,7 @@ void FileGet::priv::get_perform()
|
||||
if (file != NULL)
|
||||
fclose(file);
|
||||
wxCommandEvent* evt = new wxCommandEvent(EVT_DWNLDR_FILE_ERROR);
|
||||
evt->SetString(error);
|
||||
evt->SetString(GUI::from_u8(error));
|
||||
evt->SetInt(m_id);
|
||||
m_evt_handler->QueueEvent(evt);
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user