mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-02 00:02:12 -05:00
Don't throw exception when file downloader alg is canceled
This commit is contained in:
parent
c24436865c
commit
016a8a2974
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user