Browse Source

Fix CLI PCB drill export when output path does not end with path separator.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14438
jobs
Wayne Stambaugh 1 year ago
parent
commit
b6734c42f0
  1. 7
      kicad/cli/command_pcb_export_drill.cpp

7
kicad/cli/command_pcb_export_drill.cpp

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2022 Mark Roszko <mark.roszko@gmail.com> * Copyright (C) 2022 Mark Roszko <mark.roszko@gmail.com>
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2023, 2024 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software: you can redistribute it and/or modify it * This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the * under the terms of the GNU General Public License as published by the
@ -41,6 +41,7 @@
#define ARG_MAP_FORMAT "--map-format" #define ARG_MAP_FORMAT "--map-format"
#define ARG_DRILL_ORIGIN "--drill-origin" #define ARG_DRILL_ORIGIN "--drill-origin"
CLI::PCB_EXPORT_DRILL_COMMAND::PCB_EXPORT_DRILL_COMMAND() : PCB_EXPORT_BASE_COMMAND( "drill", CLI::PCB_EXPORT_DRILL_COMMAND::PCB_EXPORT_DRILL_COMMAND() : PCB_EXPORT_BASE_COMMAND( "drill",
false, true ) false, true )
{ {
@ -109,7 +110,8 @@ int CLI::PCB_EXPORT_DRILL_COMMAND::doPerform( KIWAY& aKiway )
if( !drillJob->m_outputDir.IsEmpty() ) if( !drillJob->m_outputDir.IsEmpty() )
{ {
wxFileName fn( drillJob->m_outputDir );
wxFileName fn( drillJob->m_outputDir, wxEmptyString );
if( !fn.IsDir() ) if( !fn.IsDir() )
{ {
wxFprintf( stderr, _( "Output must be a directory\n" ) ); wxFprintf( stderr, _( "Output must be a directory\n" ) );
@ -175,6 +177,7 @@ int CLI::PCB_EXPORT_DRILL_COMMAND::doPerform( KIWAY& aKiway )
wxString drillFormat = wxString drillFormat =
From_UTF8( m_argParser.get<std::string>( ARG_EXCELLON_OVAL_FORMAT ).c_str() ); From_UTF8( m_argParser.get<std::string>( ARG_EXCELLON_OVAL_FORMAT ).c_str() );
if( drillFormat == wxS( "route" ) ) if( drillFormat == wxS( "route" ) )
{ {
drillJob->m_excellonOvalDrillRoute = true; drillJob->m_excellonOvalDrillRoute = true;

Loading…
Cancel
Save