kicad_cli fp ugrade: create directory with extension
This commit is contained in:
parent
64382a85fa
commit
ff4b59afeb
|
@ -198,6 +198,14 @@ bool PCB_IO_MGR::ConvertLibrary( STRING_UTF8_MAP* aOldFileProps, const wxString&
|
||||||
wxArrayString fpNames;
|
wxArrayString fpNames;
|
||||||
wxFileName newFileName( aNewFilePath );
|
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 ) )
|
if( !newFileName.DirExists() && !wxFileName::Mkdir( aNewFilePath, wxS_DIR_DEFAULT ) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -297,4 +305,4 @@ static PCB_IO_MGR::REGISTER_PLUGIN registerIPC2581Plugin(
|
||||||
PCB_IO_MGR::IPC2581,
|
PCB_IO_MGR::IPC2581,
|
||||||
wxT( "IPC-2581" ),
|
wxT( "IPC-2581" ),
|
||||||
[]() -> PCB_IO* { return new PCB_IO_IPC2581; } );
|
[]() -> PCB_IO* { return new PCB_IO_IPC2581; } );
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
Loading…
Reference in New Issue