Skip to content

Commit

Permalink
[processing] Fix feedback confusion with multiple download file alg b…
Browse files Browse the repository at this point in the history
…y adding a successfully downloaded URL information message
  • Loading branch information
nirvn committed Jan 20, 2021
1 parent 1fed902 commit 4f5a5ac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/analysis/processing/qgsalgorithmfiledownloader.cpp
Expand Up @@ -95,10 +95,12 @@ QVariantMap QgsFileDownloaderAlgorithm::processAlgorithm( const QVariantMap &par
if ( !feedback->isCanceled() && !exists )
throw QgsProcessingException( tr( "Output file doesn't exist." ) );

url = downloadedUrl.toDisplayString();
feedback->pushInfo( QObject::tr( "Successfully downloaded %1" ).arg( url ) );

if ( outputFile.startsWith( QgsProcessingUtils::tempFolder() ) )
{
// the output is temporary and its file name automatically generated, try to add a file extension
url = downloadedUrl.toDisplayString();
const int length = url.size();
const int lastDotIndex = url.lastIndexOf( "." );
const int lastSlashIndex = url.lastIndexOf( "/" );
Expand Down

0 comments on commit 4f5a5ac

Please sign in to comment.