eeschema: Clean up backup name

This fixes the last suffix that was missed by 168fa09f5.  The schematic
backup files should have the suffix .sch-bak to distinguish from
.kicad_pcb-bak or other backups.
This commit is contained in:
Seth Hillbrand 2019-07-18 22:08:25 -07:00
parent 8f1aa28b37
commit b6fe4ff637
2 changed files with 2 additions and 3 deletions

View File

@ -91,7 +91,6 @@ wxString AddFileExtListToFilter( const std::vector<std::string>& aExts )
const std::string SchematicSymbolFileExtension( "sym" );
const std::string SchematicLibraryFileExtension( "lib" );
const std::string SchematicBackupFileExtension( "bak" );
const std::string VrmlFileExtension( "wrl" );

View File

@ -94,8 +94,8 @@ bool SCH_EDIT_FRAME::SaveEEFile( SCH_SCREEN* aScreen, bool aSaveUnderNewName,
{
wxFileName backupFileName = schematicFileName;
// Rename the old file to a '.bak' one:
backupFileName.SetExt( SchematicBackupFileExtension );
// Rename the old file to a '-bak' suffixed one:
backupFileName.SetExt( schematicFileName.GetExt() + GetBackupSuffix() );
if( backupFileName.FileExists() )
wxRemoveFile( backupFileName.GetFullPath() );