From a302b7af99fa73ca5bbc5ef1701bd938671d7a70 Mon Sep 17 00:00:00 2001 From: Houtan Bastani <houtan@dynare.org> Date: Fri, 8 Sep 2017 14:57:53 +0200 Subject: [PATCH] =?UTF-8?q?simplify=20check=20for=20=E2=80=98.=E2=80=99=20?= =?UTF-8?q?in=20name?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- matlab/dynare.m | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/matlab/dynare.m b/matlab/dynare.m index 2cb1bdee0a..7b4f3c13eb 100644 --- a/matlab/dynare.m +++ b/matlab/dynare.m @@ -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 -- GitLab