From 5396bb970fd960fb79d4a973c912e174068720e3 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 27 Feb 2022 20:15:03 +0000 Subject: [PATCH] Don't rename archives when doing a project save-as. Fixes https://gitlab.com/kicad/code/kicad/issues/10184 --- kicad/tools/kicad_manager_control.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/kicad/tools/kicad_manager_control.cpp b/kicad/tools/kicad_manager_control.cpp index 383c41c701..18d838734c 100644 --- a/kicad/tools/kicad_manager_control.cpp +++ b/kicad/tools/kicad_manager_control.cpp @@ -456,15 +456,13 @@ public: wxString newProjectFootprintLib = pathSep + m_newProjectName + wxT( ".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 );