Don't rename archives when doing a project save-as.

Fixes https://gitlab.com/kicad/code/kicad/issues/10184
This commit is contained in:
Jeff Young 2022-02-27 20:15:03 +00:00
parent c4d2ac570f
commit 8d28fe962f
1 changed files with 4 additions and 6 deletions

View File

@ -453,15 +453,13 @@ public:
wxString newProjectFootprintLib = pathSep + m_newProjectName + ".pretty" + pathSep;
if( destPath.StartsWith( m_projectDirPath ) )
{
destPath.Replace( m_projectDirPath, m_newProjectDirPath, false );
destFile.SetPath( destPath );
}
if( destName == m_projectName )
destFile.SetName( m_newProjectName );
destPath.Replace( srcProjectFootprintLib, newProjectFootprintLib, true );
if( destName == m_projectName && ext != wxT( "zip" ) /* don't rename archives */ )
destFile.SetName( m_newProjectName );
destFile.SetPath( destPath );
KiCopyFile( aSrcFilePath, destFile.GetFullPath(), m_errors );