From 41ef767676cd00f569483880570fdad4de934d35 Mon Sep 17 00:00:00 2001 From: Marek Roszko <mark.roszko@gmail.com> Date: Tue, 14 Jan 2025 20:50:39 -0500 Subject: [PATCH] Tweak the odb job pathing again --- common/jobs/job.cpp | 14 -------------- common/jobs/job.h | 2 -- pcbnew/pcbnew_jobs_handler.cpp | 4 ++-- 3 files changed, 2 insertions(+), 18 deletions(-) diff --git a/common/jobs/job.cpp b/common/jobs/job.cpp index 30eb4fd4ec..3dd82b49a2 100644 --- a/common/jobs/job.cpp +++ b/common/jobs/job.cpp @@ -149,20 +149,6 @@ void JOB::SetConfiguredOutputPath( const wxString& aPath ) } -bool JOB::OutputPathFullSpecified() const -{ - if( m_outputPath.IsEmpty() ) - return false; - - wxFileName fn( m_outputPath ); - - if( m_outputPathIsDirectory ) - return fn.IsDir(); - else - return !fn.IsDir(); -} - - KICOMMON_API void to_json( nlohmann::json& j, const JOB& f ) { f.ToJson( j ); diff --git a/common/jobs/job.h b/common/jobs/job.h index 364a0621e6..6f1522db8a 100644 --- a/common/jobs/job.h +++ b/common/jobs/job.h @@ -244,8 +244,6 @@ public: */ wxString GetFullOutputPath( PROJECT* aProject ) const; - bool OutputPathFullSpecified() const; - bool GetOutputPathIsDirectory() const { return m_outputPathIsDirectory; } protected: diff --git a/pcbnew/pcbnew_jobs_handler.cpp b/pcbnew/pcbnew_jobs_handler.cpp index 6e3cec74b9..4340d67751 100644 --- a/pcbnew/pcbnew_jobs_handler.cpp +++ b/pcbnew/pcbnew_jobs_handler.cpp @@ -1855,7 +1855,7 @@ int PCBNEW_JOBS_HANDLER::JobExportIpc2581( JOB* aJob ) aJob->SetTitleBlock( brd->GetTitleBlock() ); - if( !job->OutputPathFullSpecified() ) + if( job->GetConfiguredOutputPath().IsEmpty() ) { wxFileName fn = brd->GetFileName(); fn.SetName( fn.GetName() ); @@ -1952,7 +1952,7 @@ int PCBNEW_JOBS_HANDLER::JobExportOdb( JOB* aJob ) wxString path = job->GetConfiguredOutputPath(); - if( !job->OutputPathFullSpecified() ) + if( job->GetConfiguredOutputPath().IsEmpty() ) { if( job->m_compressionMode == JOB_EXPORT_PCB_ODB::ODB_COMPRESSION::NONE ) {