Skip to content

Commit

Permalink
[processing] Fix points to path algorithm's handling of text folder o…
Browse files Browse the repository at this point in the history
…utput's temporary destination
  • Loading branch information
nirvn authored and nyalldawson committed Sep 10, 2024
1 parent 1837a2c commit 2694848
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/analysis/processing/qgsalgorithmpointstopaths.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,10 @@ QVariantMap QgsPointsToPathsAlgorithm::processAlgorithm( const QVariantMap &para
throw QgsProcessingException( invalidSinkError( parameters, QStringLiteral( "OUTPUT" ) ) );

const QString textDir = parameterAsString( parameters, QStringLiteral( "OUTPUT_TEXT_DIR" ), context );
if ( ! textDir.isEmpty() &&
! QDir( textDir ).exists() )
throw QgsProcessingException( QObject::tr( "The text output directory does not exist" ) );
if ( !textDir.isEmpty() && !QDir().mkpath( textDir ) )
{
throw QgsProcessingException( QObject::tr( "Failed to create the text output directory" ) );
}

QgsDistanceArea da = QgsDistanceArea();
da.setSourceCrs( source->sourceCrs(), context.transformContext() );
Expand Down

0 comments on commit 2694848

Please sign in to comment.