File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
python/plugins/processing/algs/gdal Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 26
26
__revision__ = '$Format:%H$'
27
27
28
28
import os
29
+ import re
29
30
30
31
from qgis .PyQt .QtGui import QIcon
31
32
@@ -58,7 +59,9 @@ def processAlgorithm(self, progress):
58
59
c = c .replace (layer .source (), exported )
59
60
if os .path .isfile (layer .source ()):
60
61
fileName = os .path .splitext (os .path .split (layer .source ())[1 ])[0 ]
61
- 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 )
62
65
63
66
commands [i ] = c
64
67
GdalUtils .runGdal (commands , progress )
You can’t perform that action at this time.
0 commit comments