diff --git a/src/libslic3r/utils.cpp b/src/libslic3r/utils.cpp index e780220534..2b867c8af3 100644 --- a/src/libslic3r/utils.cpp +++ b/src/libslic3r/utils.cpp @@ -443,13 +443,13 @@ int copy_file(const std::string &from, const std::string &to, const bool with_ch { std::string to_temp = to + ".tmp"; int ret_val = copy_file_inner(from,to_temp); - if(ret_val == 0 && with_check) + if(ret_val == 0) { - ret_val = check_copy(from, to_temp); - if (ret_val == 0) - { + if (with_check) + ret_val = check_copy(from, to_temp); + + if (ret_val == 0) rename_file(to_temp, to); - } } return ret_val; } diff --git a/src/slic3r/GUI/RemovableDriveManager.hpp b/src/slic3r/GUI/RemovableDriveManager.hpp index ea4584feee..1767490d10 100644 --- a/src/slic3r/GUI/RemovableDriveManager.hpp +++ b/src/slic3r/GUI/RemovableDriveManager.hpp @@ -3,6 +3,7 @@ #include #include +#include namespace Slic3r { namespace GUI {