Browse Source

kicad_cli fp ugrade: create directory with extension

8.0
Roberto Fernandez Bautista 2 years ago
parent
commit
ff4b59afeb
  1. 8
      pcbnew/pcb_io/pcb_io_mgr.cpp

8
pcbnew/pcb_io/pcb_io_mgr.cpp

@ -198,6 +198,14 @@ bool PCB_IO_MGR::ConvertLibrary( STRING_UTF8_MAP* aOldFileProps, const wxString&
wxArrayString fpNames;
wxFileName newFileName( aNewFilePath );
if( newFileName.HasExt() )
{
wxString extraDir = newFileName.GetFullName();
newFileName.ClearExt();
newFileName.SetName( "" );
newFileName.AppendDir( extraDir );
}
if( !newFileName.DirExists() && !wxFileName::Mkdir( aNewFilePath, wxS_DIR_DEFAULT ) )
return false;

Loading…
Cancel
Save