diff --git a/kicad/project_template.cpp b/kicad/project_template.cpp index c18866eda6..d4c1d65e0e 100644 --- a/kicad/project_template.cpp +++ b/kicad/project_template.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2012 Brian Sidebotham - * Copyright (C) 1992-2019 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -29,6 +29,8 @@ #include #include +#include + #include "project_template.h" @@ -183,8 +185,10 @@ bool PROJECT_TEMPLATE::CreateProject( wxFileName& aNewProjectPath, wxString* aEr // Do not rename project specific symbol libraries. This will break the symbol library // table which will cause broken symbol library links in the schematic. - if( !( destination.GetExt() == "dcm" - || ( destination.GetExt() == "lib" && !destination.GetName().EndsWith( "-cache" ) ) ) ) + if( !( destination.GetExt() == PageLayoutDescrFileExtension ) + && !( destination.GetExt() == "dcm" + || ( destination.GetExt() == "lib" + && !destination.GetName().EndsWith( "-cache" ) ) ) ) currname.Replace( basename, aNewProjectPath.GetName() ); destination.SetName( currname );