check if TEMP_PATH in the settings changed

This commit is contained in:
David Signer 2019-11-26 17:12:55 +01:00 committed by Nyall Dawson
parent 8274566b62
commit ef8e251cf8

View File

@ -688,7 +688,7 @@ QString QgsProcessingUtils::tempFolder()
static QString sFolder;
static QMutex sMutex;
sMutex.lock();
if ( sFolder.isEmpty() )
if ( sFolder.isEmpty() || !sFolder.startsWith( QgsSettings().value( QStringLiteral( "Processing/Configuration/TEMP_PATH" ), QDir::tempPath() ).toString() ) )
{
QString subPath = QUuid::createUuid().toString().remove( '-' ).remove( '{' ).remove( '}' );
sFolder = QgsSettings().value( QStringLiteral( "Processing/Configuration/TEMP_PATH" ), QDir::tempPath() ).toString() + QStringLiteral( "/processing_" ) + subPath;