From a93a59025a50e20671b36ff4295819a8a19d060c Mon Sep 17 00:00:00 2001 From: mordka Date: Mon, 8 Jul 2019 14:19:35 +0200 Subject: [PATCH 1/4] fix: handle opensfm project path with spaces fixes #1006 Former-commit-id: 69fc73ce448a070242badf5101eaeaf11136e928 --- opendm/osfm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendm/osfm.py b/opendm/osfm.py index 04162750..c9f236fe 100644 --- a/opendm/osfm.py +++ b/opendm/osfm.py @@ -17,7 +17,7 @@ class OSFMContext: self.opensfm_project_path = opensfm_project_path def run(self, command): - system.run('%s/bin/opensfm %s %s' % + system.run('%s/bin/opensfm %s "%s"' % (context.opensfm_path, command, self.opensfm_project_path)) def export_bundler(self, destination_bundle_file, rerun=False): From 1b5d775c863a38175db84a6431254ac65fe9fd9e Mon Sep 17 00:00:00 2001 From: mordka Date: Mon, 8 Jul 2019 14:19:48 +0200 Subject: [PATCH 2/4] fix: handle export bundler project path with spaces related #1006 Former-commit-id: 6f556f6717ace46f58dcdb6b7d26282d0effe36c --- opendm/osfm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendm/osfm.py b/opendm/osfm.py index c9f236fe..9d47291a 100644 --- a/opendm/osfm.py +++ b/opendm/osfm.py @@ -23,7 +23,7 @@ class OSFMContext: def export_bundler(self, destination_bundle_file, rerun=False): if not io.file_exists(destination_bundle_file) or rerun: # convert back to bundler's format - system.run('%s/bin/export_bundler %s' % + system.run('%s/bin/export_bundler "%s"' % (context.opensfm_path, self.opensfm_project_path)) else: log.ODM_WARNING('Found a valid Bundler file in: %s' % destination_bundle_file) From dd0c23f4ec9149a19ac1d4beb5cd1661bf4f9527 Mon Sep 17 00:00:00 2001 From: mordka Date: Mon, 8 Jul 2019 17:15:32 +0200 Subject: [PATCH 3/4] fix: support mve path with spaces related #1006 Former-commit-id: 285c5995a57f505a6193d864a9382d56324c199d --- stages/mve.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stages/mve.py b/stages/mve.py index 4b4a4902..a27012a4 100644 --- a/stages/mve.py +++ b/stages/mve.py @@ -42,7 +42,7 @@ class ODMMveStage(types.ODM_Stage): # run mve makescene if not io.dir_exists(tree.mve_views): - system.run('%s %s %s' % (context.makescene_path, tree.mve_path, tree.mve), env_vars={'OMP_NUM_THREADS': args.max_concurrency}) + system.run('%s "%s" "%s"' % (context.makescene_path, tree.mve_path, tree.mve), env_vars={'OMP_NUM_THREADS': args.max_concurrency}) self.update_progress(10) From 46fe7a0eba6fc16c7dcf56f6808c9a092647acdd Mon Sep 17 00:00:00 2001 From: mordka Date: Mon, 8 Jul 2019 17:15:59 +0200 Subject: [PATCH 4/4] fix: support dense reconstruction path with spaces related #1006 Former-commit-id: 1d9baff4ed56c0cce064d116432cf8b6dd26863d --- stages/mve.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stages/mve.py b/stages/mve.py index a27012a4..2d43b926 100644 --- a/stages/mve.py +++ b/stages/mve.py @@ -119,7 +119,7 @@ class ODMMveStage(types.ODM_Stage): retry_count = 1 while retry_count < 10: try: - system.run('%s %s %s' % (context.dmrecon_path, ' '.join(dmrecon_config), tree.mve), env_vars={'OMP_NUM_THREADS': args.max_concurrency}) + system.run('%s "%s" "%s"' % (context.dmrecon_path, ' '.join(dmrecon_config), tree.mve), env_vars={'OMP_NUM_THREADS': args.max_concurrency}) break except Exception as e: if str(e) == "Child returned 134" or str(e) == "Child returned 1":