We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 769fe65 commit 5719fecCopy full SHA for 5719fec
python/plugins/processing/algs/gdal/GdalAlgorithm.py
@@ -26,6 +26,7 @@
26
__revision__ = '$Format:%H$'
27
28
import os
29
+import re
30
31
from qgis.PyQt.QtGui import QIcon
32
@@ -58,7 +59,9 @@ def processAlgorithm(self, progress):
58
59
c = c.replace(layer.source(), exported)
60
if os.path.isfile(layer.source()):
61
fileName = os.path.splitext(os.path.split(layer.source())[1])[0]
- c = c.replace(' ' + fileName + ' ', ' ' + exportedFileName + ' ')
62
+ c = re.sub('[\s]{}[\s]'.format(fileName), ' ' + exportedFileName + ' ', c)
63
+ c = re.sub('[\s]{}'.format(fileName), ' ' + exportedFileName, c)
64
+ c = re.sub('["\']{}["\']'.format(fileName), "'" + exportedFileName + "'", c)
65
66
commands[i] = c
67
GdalUtils.runGdal(commands, progress)
0 commit comments