Skip to content
Snippets Groups Projects
Commit b7e9d698 authored by Johannes Pfeifer's avatar Johannes Pfeifer
Browse files

dynare.m: remove redundant legacy check for file ending

parent 7bf0395a
Branches
No related tags found
No related merge requests found
......@@ -297,17 +297,13 @@ if status
error('Dynare: preprocessing failed')
end
if ~ isempty(find(abs(fname) == 46))
fname = fname(:,1:find(abs(fname) == 46)-1) ;
end
% We need to clear the driver (and only the driver, because the "clear all"
% within the driver will clean the rest)
clear(['+' fname '/driver'])
clear(['+' fname(1:end-4) '/driver'])
try
cTic = tic;
evalin('base',[fname '.driver']);
evalin('base',[fname(1:end-4) '.driver']);
cToc = toc(cTic);
if nargout
DynareInfo.time.compute = cToc;
......@@ -315,7 +311,7 @@ try
catch ME
W = evalin('caller','whos');
diary off
if ismember(fname,{W(:).name})
if ismember(fname(1:end-4),{W(:).name})
error('Your workspace already contains a variable with the same name as the mod-file. You need to delete it or rename the mod-file.')
else
rethrow(ME)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment