Fix compile error
wxMkDir's mode is required for linux but not windows (yay)
This commit is contained in:
parent
32b6deb8b1
commit
fa15f8aa0c
|
@ -838,8 +838,8 @@ void PANEL_FP_LIB_TABLE::onMigrateLibraries( wxCommandEvent& event )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool PANEL_FP_LIB_TABLE::convertLibrary( STRING_UTF8_MAP* aOldFileProps,
|
bool PANEL_FP_LIB_TABLE::convertLibrary( STRING_UTF8_MAP* aOldFileProps,
|
||||||
const wxString& aOldFilePath,
|
const wxString& aOldFilePath,
|
||||||
const wxString& aNewFilePath)
|
const wxString& aNewFilePath)
|
||||||
{
|
{
|
||||||
IO_MGR::PCB_FILE_T oldFileType = IO_MGR::GuessPluginTypeFromLibPath( aOldFilePath );
|
IO_MGR::PCB_FILE_T oldFileType = IO_MGR::GuessPluginTypeFromLibPath( aOldFilePath );
|
||||||
|
@ -847,7 +847,7 @@ bool PANEL_FP_LIB_TABLE::convertLibrary( STRING_UTF8_MAP* aOldFileProps,
|
||||||
if( oldFileType == IO_MGR::FILE_TYPE_NONE )
|
if( oldFileType == IO_MGR::FILE_TYPE_NONE )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
||||||
PLUGIN::RELEASER oldFilePI( IO_MGR::PluginFind( oldFileType ) );
|
PLUGIN::RELEASER oldFilePI( IO_MGR::PluginFind( oldFileType ) );
|
||||||
PLUGIN::RELEASER kicadPI( IO_MGR::PluginFind( IO_MGR::KICAD_SEXP ) );
|
PLUGIN::RELEASER kicadPI( IO_MGR::PluginFind( IO_MGR::KICAD_SEXP ) );
|
||||||
wxArrayString fpNames;
|
wxArrayString fpNames;
|
||||||
|
@ -856,13 +856,13 @@ bool PANEL_FP_LIB_TABLE::convertLibrary( STRING_UTF8_MAP* aOldFileProps,
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if( !newFileName.DirExists() )
|
if( !newFileName.DirExists() )
|
||||||
wxMkDir( aNewFilePath );
|
wxMkDir( aNewFilePath, wxS_DIR_DEFAULT );
|
||||||
|
|
||||||
bool bestEfforts = false; // throw on first error
|
bool bestEfforts = false; // throw on first error
|
||||||
oldFilePI->FootprintEnumerate( fpNames, aOldFilePath, bestEfforts, aOldFileProps );
|
oldFilePI->FootprintEnumerate( fpNames, aOldFilePath, bestEfforts, aOldFileProps );
|
||||||
|
|
||||||
for ( const wxString& fpName : fpNames )
|
for ( const wxString& fpName : fpNames )
|
||||||
{
|
{
|
||||||
std::unique_ptr<const FOOTPRINT> fp( oldFilePI->GetEnumeratedFootprint( aOldFilePath, fpName, aOldFileProps ) );
|
std::unique_ptr<const FOOTPRINT> fp( oldFilePI->GetEnumeratedFootprint( aOldFilePath, fpName, aOldFileProps ) );
|
||||||
kicadPI->FootprintSave( aNewFilePath, fp.get() );
|
kicadPI->FootprintSave( aNewFilePath, fp.get() );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue