Skip to content
Snippets Groups Projects
Commit a2888730 authored by leprob001's avatar leprob001
Browse files

The upgrade interim process has been updated.

The warnings on loading the old interim file have been disabled to not
distract the user.

If an adjusted interim file exists, the current date and time is appended
to the filename.
parent 45715993
No related branches found
No related tags found
No related merge requests found
249
\ No newline at end of file
250
\ No newline at end of file
......@@ -36,7 +36,11 @@ try
versionsFileNames = dir(fullfile(versionsFilePath, 'versions', 'v*.m'));
%% Load the interim file
% disable warning during load, because there can be interim files that
% do not have the artoaConfig variable
warning off;
load(pInterimFilename, 'artoaWorkspace', 'artoaDataInput', 'artoaConfig', '-mat');
warning on;
%% Get itm version
itmVersion = 'unknown';
......@@ -65,11 +69,16 @@ try
[path, name, ext] = fileparts(pInterimFilename);
adjustedFilename = fullfile(path, [name '_' versionsFileNames(end).name(2:end - 2) ext]);
if isfile(adjustedFilename)
adjustedFilename = [ adjustedFilename '.' datestr(datetime('now'), 'yyyymmddHHMMSS')];
end
save( ...
adjustedFilename, ...
'artoaWorkspace', 'artoaDataInput', 'artoaConfig', ...
'-mat' ...
);
adjustedFilename, ...
'artoaWorkspace', 'artoaDataInput', 'artoaConfig', ...
'-mat' ...
);
catch Ex
disp(Ex);
success = false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment