Skip to content
Permalink
Browse files

[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 5690b05e6e3d38f15648381da536ebbf03abfb76
Showing with 6 additions and 0 deletions.
  1. +6 −0 python/plugins/processing/algs/saga/SagaAlgorithm.py
@@ -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

0 comments on commit 5690b05

Please sign in to comment.
You can’t perform that action at this time.