summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7e93414)
raw | patch | inline | side by side (parent: 7e93414)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Sat, 5 Jan 2019 18:59:17 +0000 (21:59 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Sat, 5 Jan 2019 18:59:17 +0000 (21:59 +0300) |
src/editor/f_packmap.pas | patch | blob | history |
index f9bb418620c837651fb936c85030e7d0d13ddd53..0c361c52e5ba19bac69a6d399ed6e039851f0716 100644 (file)
--- a/src/editor/f_packmap.pas
+++ b/src/editor/f_packmap.pas
// Не перезаписывать 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();