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,9 +141,21 @@ bool JSON_SETTINGS::LoadFromFile( const wxString& aDirectory )
if( backed_up ) if( backed_up )
{ {
cfg.reset(); 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 // Either way, we want to clean up the old file afterwards
legacy_migrated = true; legacy_migrated = true;