Skip to content
Permalink
Browse files

Don't throw exception when file downloader alg is canceled

  • Loading branch information
nyalldawson committed Oct 25, 2017
1 parent c244368 commit 016a8a2974f71ffd495253222a8429a8efd6bf66
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/analysis/processing/qgsalgorithmfiledownloader.cpp
@@ -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;
}

0 comments on commit 016a8a2

Please sign in to comment.
You can’t perform that action at this time.