Commit 41e6ecaa authored by Houtan Bastani's avatar Houtan Bastani

bug: nopathchange was always being set, regardless of whether or not the flag was passed

parent d730353f
......@@ -51,9 +51,9 @@ change_path_flag = true;
% Filter out some options.
if nargin>1
id = strfind(varargin,'nopathchange');
if ~isempty(id)
if ~all(cellfun(@isempty, id))
change_path_flag = false;
varargin(id{1}) = [];
varargin(cellfun(@isempty, id) == 0) = [];
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