From: DeaDDooMER Date: Sat, 5 Jan 2019 18:59:17 +0000 (+0300) Subject: fix packmap on win32 X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=8c3e397c5920444fc9c1a5c44747708acf1e0467;p=d2df-editor.git fix packmap on win32 --- diff --git a/src/editor/f_packmap.pas b/src/editor/f_packmap.pas index f9bb418..0c361c5 100644 --- a/src/editor/f_packmap.pas +++ b/src/editor/f_packmap.pas @@ -129,8 +129,14 @@ begin // Не перезаписывать WAD, а дополнить: if not cbAdd.Checked then + begin if FileExists(eWAD.Text) then - ASSERT(RenameFile(eWAD.Text, eWAD.Text + '.bak0')); + begin + if FileExists(eWAD.Text + '.bak0') then + ASSERT(DeleteFile(eWAD.Text + '.bak0')); + ASSERT(RenameFile(eWAD.Text, eWAD.Text + '.bak0')) + end + end; // Читаем карту из памяти: mr := TMapReader_1.Create();