Skip to content

Commit

Permalink
MEX: add check, path shouldnt contain spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
FreyJo committed Aug 24, 2020
1 parent 5611fef commit 5a0fe93
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions interfaces/acados_matlab_octave/acados_ocp.m
Expand Up @@ -89,6 +89,12 @@
% detect dimensions & sanity checks
[obj.model_struct, obj.opts_struct] = detect_dims_ocp(obj.model_struct, obj.opts_struct);

% check if path contains spaces
if ~isempty(strfind(obj.opts_struct.output_dir, ' '))
error(strcat('acados_ocp: Path should not contain spaces, got: ',...
obj.opts_struct.output_dir));
end

% compile mex interface (without model dependency)
if ( strcmp(obj.opts_struct.compile_interface, 'true') )
compile_interface = true;
Expand Down
6 changes: 6 additions & 0 deletions interfaces/acados_matlab_octave/acados_sim.m
Expand Up @@ -62,6 +62,12 @@
end
end

% check if path contains spaces
if ~isempty(strfind(obj.opts_struct.output_dir, ' '))
error(strcat('acados_ocp: Path should not contain spaces, got: ',...
obj.opts_struct.output_dir));
end

%% compile mex without model dependency
% check if mex interface exists already
if strcmp(obj.opts_struct.compile_interface, 'true')
Expand Down

0 comments on commit 5a0fe93

Please sign in to comment.