Skip to content

Commit

Permalink
Don't throw exception when file downloader alg is canceled
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Oct 25, 2017
1 parent c244368 commit 016a8a2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/analysis/processing/qgsalgorithmfiledownloader.cpp
Expand Up @@ -82,11 +82,12 @@ QVariantMap QgsFileDownloaderAlgorithm::processAlgorithm( const QVariantMap &par
loop.exec();

timer.stop();
if ( ! QFileInfo( outputFile ).exists() )
bool exists = QFileInfo( outputFile ).exists();
if ( !feedback->isCanceled() && !exists )
throw QgsProcessingException( tr( "Output file doesn't exist." ) );

QVariantMap outputs;
outputs.insert( QStringLiteral( "OUTPUT" ), outputFile );
outputs.insert( QStringLiteral( "OUTPUT" ), exists ? outputFile : QString() );
return outputs;
}

Expand Down

0 comments on commit 016a8a2

Please sign in to comment.