An attempt to fix missing renaming from .gcode.tmp to .gcode

Added a missing include
This commit is contained in:
Lukas Matena 2019-12-21 12:31:32 +01:00
parent 8c7fa7f69e
commit 13f1bb2e43
2 changed files with 6 additions and 5 deletions

View file

@ -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;
}

View file

@ -3,6 +3,7 @@
#include <vector>
#include <string>
#include <functional>
namespace Slic3r {
namespace GUI {