diff --git a/src/slic3r/GUI/ConfigWizard.cpp b/src/slic3r/GUI/ConfigWizard.cpp index 224c0e30b..2d2fbd8d7 100644 --- a/src/slic3r/GUI/ConfigWizard.cpp +++ b/src/slic3r/GUI/ConfigWizard.cpp @@ -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; diff --git a/src/slic3r/GUI/DownloaderFileGet.cpp b/src/slic3r/GUI/DownloaderFileGet.cpp index 9eda21293..b30c1a237 100644 --- a/src/slic3r/GUI/DownloaderFileGet.cpp +++ b/src/slic3r/GUI/DownloaderFileGet.cpp @@ -9,6 +9,8 @@ #include #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); })