Don't rename archives when doing a project save-as.
Fixes https://gitlab.com/kicad/code/kicad/issues/10184
This commit is contained in:
parent
c4d2ac570f
commit
8d28fe962f
|
@ -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 );
|
||||
|
|
Loading…
Reference in New Issue