From c6743148590819de81bf063d9caa121422faa177 Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Sun, 13 Oct 2013 20:14:52 -0400 Subject: [PATCH] Fix bug when creating initial global footprint library table on Windows. --- common/fp_lib_table.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/fp_lib_table.cpp b/common/fp_lib_table.cpp index ace123d410..5b40336d05 100644 --- a/common/fp_lib_table.cpp +++ b/common/fp_lib_table.cpp @@ -772,6 +772,12 @@ bool FP_LIB_TABLE::LoadGlobalTable( FP_LIB_TABLE& aTable ) throw (IO_ERROR, PARS { tableExists = false; + if( !fn.DirExists() && !fn.Mkdir( 0x777, wxPATH_MKDIR_FULL ) ) + { + THROW_IO_ERROR( wxString::Format( _( "Cannot create global library table path <%s>." ), + GetChars( fn.GetPath() ) ) ); + } + // Attempt to copy the default global file table from the KiCad template folder to // the users home configuration path. wxString fileName( wxT( "fp_global_table" ) );