open-AIMS / ADRIA_matlab

Repository for the development of ADRIA: Adaptive Dynamic Reef Intervention Algorithms. ADRIA is a multi-criteria decision support tool set particularly useful for informing reef restoration and adaptation interventions.
1 stars 0 forks source link

Paths not interpreted correctly on mac when running example scripts #71

Closed ConnectedSystems closed 2 years ago

ConnectedSystems commented 2 years ago

As reported by @ryanheneghan

When running the batch_runs example, the script errors out as it is unable to find the indicated result files.

I suspect matlab (on mac) is incorrectly interpreting path names as a file name, which has the effect of duplicating the path when the folder and filename are joined together.

e.g.

target_file = "./usr/result_folder/result_set"

% directory gets interpreted as
directory = "/usr/result_folder"

% filename gets interpreted as
filename = "result_folder/result_set"  % instead of simply "result_set"

% when files paths are generated:
file_path = "/usr/result_folderresult_folder/result_set"
ConnectedSystems commented 2 years ago

Fixed with commit 252c624 ; 510d4959cc71f4a6210085a3507488962f1a920a