JSON_SETTINGS: add more wxLogTrace() calls.

This commit is contained in:
jean-pierre charras 2020-08-03 08:44:34 +02:00
parent c56599ab07
commit a146cd9e2e
1 changed files with 15 additions and 3 deletions

View File

@ -141,8 +141,20 @@ bool JSON_SETTINGS::LoadFromFile( const wxString& aDirectory )
if( backed_up )
{
cfg.reset();
wxCopyFile( temp.GetFullPath(), aPath.GetFullPath() );
wxRemoveFile( temp.GetFullPath() );
if( !wxCopyFile( temp.GetFullPath(), aPath.GetFullPath() ) )
{
wxLogTrace( traceSettings,
"migrate; copy temp file %s to %s failed",
temp.GetFullPath(), aPath.GetFullPath() );
}
if( !wxRemoveFile( temp.GetFullPath() ) )
{
wxLogTrace( traceSettings,
"migrate; failed to remove temp file %s",
temp.GetFullPath() );
}
}
// Either way, we want to clean up the old file afterwards