Raise an error if file name given to dynare ends with a period.

time-shift
Stéphane Adjemian (Charybdis) 2017-06-29 22:10:06 +02:00
parent ea9084afc8
commit ec9f755c27
1 changed files with 4 additions and 0 deletions

View File

@ -97,6 +97,10 @@ if length(dot_location)>1
error('DYNARE: Periods in filenames are only allowed for .mod or .dyn extensions')
end
if dot_location==length(fname)
error('DYNARE: Periods in filenames are only allowed for .mod or .dyn extensions')
end
% Add dyn or mod extension to the file name if not already provided.
if isempty(strfind(fname,'.'))
fnamelength = length(fname);