Commit 69c27eba authored by Rashad Kanavath's avatar Rashad Kanavath

BUG: fix spaces in path name for wrapper script

normpath used in last commit alone won't work for spaces in path.
We have to ensure_double_quotes for otbcli wrapper script used in
special cases. Currently this is broken on macos
otb#1745

This commit will put otb_cli_file inside double quotes. Tested on
OpenBSD using a path with spaces.
A unit-test has been added for future testing.
parent a8783660
......@@ -239,9 +239,8 @@ class OTBAlgorithm(QgsProcessingAlgorithm):
def processAlgorithm(self, parameters, context, feedback):
output_key = self.outputParameterName()
#print('output_key', output_key)
otb_cli_file = OTBUtils.OTB_CLI_FILE
command = OTBUtils.OTB_CLI_FILE + ' ' + self.name() + ' ' + OTBUtils.appFolder()
command = '"{}" {} {}'.format(otb_cli_file, self.name(), OTBUtils.appFolder())
for k, v in parameters.items():
if k == 'outputpixeltype' or not v:
continue
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment