Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[processing] fix temporary directories handling
  • Loading branch information
alexbruy authored and nyalldawson committed May 20, 2018
1 parent e15f7cc commit 303a79a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion python/plugins/processing/gui/DestinationSelectionPanel.py
Expand Up @@ -313,7 +313,7 @@ def getValue(self):
return None

if isinstance(self.parameter, QgsProcessingParameterFolderDestination):
return self.leText.text()
return key

if isinstance(self.parameter, QgsProcessingParameterFileDestination):
return key
Expand Down
9 changes: 8 additions & 1 deletion src/core/processing/qgsprocessingparameters.cpp
Expand Up @@ -3643,7 +3643,14 @@ bool QgsProcessingDestinationParameter::fromVariantMap( const QVariantMap &map )

QString QgsProcessingDestinationParameter::generateTemporaryDestination() const
{
return QgsProcessingUtils::generateTempFilename( name() + '.' + defaultFileExtension() );
if ( defaultFileExtension().isEmpty() )
{
return QgsProcessingUtils::generateTempFilename( name() );
}
else
{
return QgsProcessingUtils::generateTempFilename( name() + '.' + defaultFileExtension() );
}
}

bool QgsProcessingDestinationParameter::createByDefault() const
Expand Down

0 comments on commit 303a79a

Please sign in to comment.