Skip to content

Commit

Permalink
Show error message if running an old version of the program with a ne…
Browse files Browse the repository at this point in the history
…w config file
  • Loading branch information
pchev committed Feb 1, 2020
1 parent 41ef39e commit 4e8346c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions skychart/pu_main.pas
Expand Up @@ -6678,6 +6678,16 @@ procedure Tf_main.ReadDefault;
begin
ReadPrivateConfig(configfile);
ReadChartConfig(configfile, True, True, def_cfgplot, def_cfgsc);
if config_version > cdcver then begin
if MessageDlg('Wrong version','You are trying to run Skychart version '+cdcver+
' but the configuration file '+Configfile+' is for a more recent version '+Config_Version+crlf+
'Please use the program options --config= and --userdir= to select another configuration '+
'if you realy want to do that.'+crlf+
'Ignoring this error can break your setup!'
,mtError,[mbAbort,mbIgnore],0)
= mrAbort
then halt;
end;
if config_version < cdcver then
UpdateConfig;
end;
Expand Down

0 comments on commit 4e8346c

Please sign in to comment.