Fix default User Template location

When we assign a string to the wxFilename, it takes the last section as
the filename (unless there is a trailing '/').  So on Linux, we got
/home/user for the Documents dir and /home/ was the directory while
'user' was the filename.  Appending directories 'kicad/templates' made
the final directory '/home/kicad/templates'.  Forcing this to be a
directory restores correct behavior.

(cherry picked from commit 0ee38653f7)
This commit is contained in:
Seth Hillbrand 2019-06-10 19:46:10 -07:00
parent c0e1f7a17a
commit 06d2170501
1 changed files with 1 additions and 1 deletions

View File

@ -445,7 +445,7 @@ bool PGM_BASE::InitPgm()
else
{
// Default user template path.
tmpFileName = wxStandardPaths::Get().GetDocumentsDir();
tmpFileName.AssignDir( wxStandardPaths::Get().GetDocumentsDir() );
tmpFileName.AppendDir( "kicad" );
tmpFileName.AppendDir( "template" );
envVarItem.SetDefinedExternally( false );