Skip to content

Commit 17ca300

Browse files
committed
[sextante] fixed issue with blank spaces in filenames in OTB
1 parent 64a77af commit 17ca300

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

python/plugins/sextante/otb/OTBAlgorithm.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,18 +128,20 @@ def processAlgorithm(self, progress):
128128
commands.append(roiFile)
129129
self.roiVectors[param.value] = roiFile
130130
else:
131-
commands.append(param.value)
131+
commands.append("\"" + param.value+ "\"")
132132
elif isinstance(param, ParameterRaster):
133133
commands.append(param.name)
134134
if self.hasROI:
135135
roiFile = SextanteUtils.getTempFilename('tif')
136136
commands.append(roiFile)
137137
self.roiRasters[param.value] = roiFile
138138
else:
139-
commands.append(param.value)
139+
commands.append("\"" + param.value+ "\"")
140140
elif isinstance(param, ParameterMultipleInput):
141141
commands.append(param.name)
142-
commands.append(str(param.value.replace(";"," ")))
142+
files = str(param.value).split(";")
143+
paramvalue = " ".join(["\"" + f + "\"" for f in files])
144+
commands.append(paramvalue)
143145
elif isinstance(param, ParameterSelection):
144146
commands.append(param.name)
145147
idx = int(param.value)

0 commit comments

Comments
 (0)