Ensure we have a destination for config template
In the event that we do not have a project configuration file, the default template will be used. But it needs a destination filename for copy_pro_file_template(). Fixes: lp:1745022 * https://bugs.launchpad.net/kicad/+bug/1745022
This commit is contained in:
parent
cf6ba6ad94
commit
b71c2e5edf
|
@ -294,6 +294,11 @@ wxConfigBase* PROJECT::configCreate( const SEARCH_STACK& aSList,
|
||||||
wxConfigBase* cfg = 0;
|
wxConfigBase* cfg = 0;
|
||||||
wxString cur_pro_fn = !aProjectFileName ? GetProjectFullName() : aProjectFileName;
|
wxString cur_pro_fn = !aProjectFileName ? GetProjectFullName() : aProjectFileName;
|
||||||
|
|
||||||
|
// If we do not have a project name or specified name, choose an empty file to store the
|
||||||
|
// temporary configuration data in.
|
||||||
|
if( cur_pro_fn.IsEmpty() )
|
||||||
|
cur_pro_fn = wxFileName::CreateTempFileName( GetProjectPath() );
|
||||||
|
|
||||||
if( wxFileName( cur_pro_fn ).IsFileReadable() )
|
if( wxFileName( cur_pro_fn ).IsFileReadable() )
|
||||||
{
|
{
|
||||||
// Note: currently, aGroupName is not used.
|
// Note: currently, aGroupName is not used.
|
||||||
|
|
Loading…
Reference in New Issue