Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[processing] added back code to replace filenames when exporting rast…
…er layers in SAGA
  • Loading branch information
volaya committed Jan 25, 2019
1 parent 76d9ab8 commit 5690b05
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions python/plugins/processing/algs/saga/SagaAlgorithm.py
Expand Up @@ -417,6 +417,12 @@ def exportRasterLayer(self, parameterName, layer):
else:
filename = os.path.basename(layer.source())

validChars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:'
filename = ''.join(c for c in filename if c in validChars)

if len(filename) == 0:
filename = 'layer'

destFilename = QgsProcessingUtils.generateTempFilename(filename + '.sgrd')
sessionExportedLayers[layer.source()] = destFilename
self.exportedLayers[parameterName] = destFilename
Expand Down

0 comments on commit 5690b05

Please sign in to comment.