Commit a302b7af authored by Houtan Bastani's avatar Houtan Bastani
Browse files

simplify check for ‘.’ in name

parent c0261133
......@@ -99,11 +99,7 @@ end
% Testing if filename has more than one period (not allowed).
dot_location=(strfind(fname,'.'));
if length(dot_location)>1
error('DYNARE: Periods in filenames are only allowed for .mod or .dyn extensions')
end
if dot_location==length(fname)
if length(dot_location) > 1 || dot_location == length(fname)
error('DYNARE: Periods in filenames are only allowed for .mod or .dyn extensions')
end
......
Supports Markdown
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