mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
ADD: Create doublecmd.xml backup on configuration version change
This commit is contained in:
parent
acd0bab58a
commit
60283a3305
1 changed files with 8 additions and 0 deletions
|
|
@ -2539,6 +2539,14 @@ begin
|
|||
gPreviousVersion:= GetAttr(Root, 'DCVersion', EmptyStr);
|
||||
LoadedConfigVersion := GetAttr(Root, 'ConfigVersion', ConfigVersion);
|
||||
|
||||
{ Create config backup }
|
||||
if (LoadedConfigVersion < ConfigVersion) then
|
||||
try
|
||||
WriteToFile(gpCfgDir + 'doublecmd-' + IntToStr(LoadedConfigVersion) + '.bak');
|
||||
except
|
||||
// Ignore
|
||||
end;
|
||||
|
||||
if (LoadedConfigVersion < 13) then
|
||||
begin
|
||||
DeleteNode(Root, 'Configuration/UseConfigInProgramDir');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue