From 93a0d3a4caa985212fd1cb12c4e3f29903d8dea2 Mon Sep 17 00:00:00 2001 From: "salt.wei" Date: Tue, 22 Nov 2022 21:22:37 +0800 Subject: [PATCH] FIX: fix a crash issue when copy failed Change-Id: Ie0cd4676d9f31213c80a4a9a7f5c836c58a53120 --- src/libslic3r/utils.cpp | 2 +- src/slic3r/GUI/GUI_App.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/libslic3r/utils.cpp b/src/libslic3r/utils.cpp index 731848ed55..0a92d2c3f8 100644 --- a/src/libslic3r/utils.cpp +++ b/src/libslic3r/utils.cpp @@ -818,7 +818,7 @@ CopyFileResult copy_file_inner(const std::string& from, const std::string& to, s if (ec) { error_message = ec.message(); BOOST_LOG_TRIVIAL(error) << boost::format("###copy_file from %1% to %2% failed, error: %3% ") - %source.string() %target.string() << error_message; + %source.string() %target.string() % error_message; return FAIL_COPY_FILE; } ec.clear(); diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index dcb8fc95c3..ebf7c8df7d 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -2459,6 +2459,10 @@ void GUI_App::copy_network_if_available() #endif BOOST_LOG_TRIVIAL(info) << __FUNCTION__<< ": checking network_library " << network_library << ", player_library " << player_library; + if (!boost::filesystem::exists(plugin_folder)) { + BOOST_LOG_TRIVIAL(info)<< __FUNCTION__ << ": create directory "<