FIX: [STUDIO-2235] FlushFileBuffers on conf bak
Change-Id: I26ddf05c8b7105bb9226930e64a736cdc9be4e4f
This commit is contained in:
parent
97179d1378
commit
8747192715
|
@ -897,6 +897,8 @@ CopyFileResult copy_file(const std::string &from, const std::string &to, std::st
|
||||||
goto __finished;
|
goto __finished;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FlushFileBuffers(handledst);
|
||||||
|
|
||||||
__finished:
|
__finished:
|
||||||
if (src_wstr)
|
if (src_wstr)
|
||||||
delete[] src_wstr;
|
delete[] src_wstr;
|
||||||
|
|
|
@ -2050,6 +2050,19 @@ void GUI_App::init_app_config()
|
||||||
m_datadir_redefined = true;
|
m_datadir_redefined = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// start log here
|
||||||
|
std::time_t t = std::time(0);
|
||||||
|
std::tm * now_time = std::localtime(&t);
|
||||||
|
std::stringstream buf;
|
||||||
|
buf << std::put_time(now_time, "debug_%a_%b_%d_%H_%M_%S_");
|
||||||
|
buf << get_current_pid() << ".log";
|
||||||
|
std::string log_filename = buf.str();
|
||||||
|
#if !BBL_RELEASE_TO_PUBLIC
|
||||||
|
set_log_path_and_level(log_filename, 5);
|
||||||
|
#else
|
||||||
|
set_log_path_and_level(log_filename, 3);
|
||||||
|
#endif
|
||||||
|
|
||||||
//BBS: remove GCodeViewer as seperate APP logic
|
//BBS: remove GCodeViewer as seperate APP logic
|
||||||
if (!app_config)
|
if (!app_config)
|
||||||
app_config = new AppConfig();
|
app_config = new AppConfig();
|
||||||
|
@ -2173,19 +2186,6 @@ bool GUI_App::OnInit()
|
||||||
|
|
||||||
bool GUI_App::on_init_inner()
|
bool GUI_App::on_init_inner()
|
||||||
{
|
{
|
||||||
//start log here
|
|
||||||
std::time_t t = std::time(0);
|
|
||||||
std::tm* now_time = std::localtime(&t);
|
|
||||||
std::stringstream buf;
|
|
||||||
buf << std::put_time(now_time, "debug_%a_%b_%d_%H_%M_%S_");
|
|
||||||
buf << get_current_pid() << ".log";
|
|
||||||
std::string log_filename = buf.str();
|
|
||||||
#if !BBL_RELEASE_TO_PUBLIC
|
|
||||||
set_log_path_and_level(log_filename, 5);
|
|
||||||
#else
|
|
||||||
set_log_path_and_level(log_filename, 3);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Set initialization of image handlers before any UI actions - See GH issue #7469
|
// Set initialization of image handlers before any UI actions - See GH issue #7469
|
||||||
wxInitAllImageHandlers();
|
wxInitAllImageHandlers();
|
||||||
#ifdef NDEBUG
|
#ifdef NDEBUG
|
||||||
|
|
Loading…
Reference in New Issue