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
d4937f1b3e
commit
5396bb970f
|
@ -456,15 +456,13 @@ public:
|
||||||
wxString newProjectFootprintLib = pathSep + m_newProjectName + wxT( ".pretty" ) + pathSep;
|
wxString newProjectFootprintLib = pathSep + m_newProjectName + wxT( ".pretty" ) + pathSep;
|
||||||
|
|
||||||
if( destPath.StartsWith( m_projectDirPath ) )
|
if( destPath.StartsWith( m_projectDirPath ) )
|
||||||
{
|
|
||||||
destPath.Replace( m_projectDirPath, m_newProjectDirPath, false );
|
destPath.Replace( m_projectDirPath, m_newProjectDirPath, false );
|
||||||
destFile.SetPath( destPath );
|
|
||||||
}
|
|
||||||
|
|
||||||
if( destName == m_projectName )
|
|
||||||
destFile.SetName( m_newProjectName );
|
|
||||||
|
|
||||||
destPath.Replace( srcProjectFootprintLib, newProjectFootprintLib, true );
|
destPath.Replace( srcProjectFootprintLib, newProjectFootprintLib, true );
|
||||||
|
|
||||||
|
if( destName == m_projectName && ext != wxT( "zip" ) /* don't rename archives */ )
|
||||||
|
destFile.SetName( m_newProjectName );
|
||||||
|
|
||||||
destFile.SetPath( destPath );
|
destFile.SetPath( destPath );
|
||||||
|
|
||||||
KiCopyFile( aSrcFilePath, destFile.GetFullPath(), m_errors );
|
KiCopyFile( aSrcFilePath, destFile.GetFullPath(), m_errors );
|
||||||
|
|
Loading…
Reference in New Issue