Prefer check on QgsProcessing::TEMPORARY_OUTPUT instead of filepath

This commit is contained in:
Nicolas Godet 2025-02-11 13:45:13 +01:00 committed by Loïc Bartoletti
parent e8c378318a
commit f61fae0cff

View File

@ -141,7 +141,7 @@ QVariantMap QgsFileDownloaderAlgorithm::processAlgorithm( const QVariantMap &par
url = downloadedUrl.toDisplayString();
feedback->pushInfo( QObject::tr( "Successfully downloaded %1" ).arg( url ) );
if ( outputFile.startsWith( QgsProcessingUtils::tempFolder( &context ) ) )
if ( parameters.value( QStringLiteral( "OUTPUT" ) ) == QgsProcessing::TEMPORARY_OUTPUT )
{
// the output is temporary and its file name automatically generated, try to add a file extension
const int length = url.size();