summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 67cddfb)
raw | patch | inline | side by side (parent: 67cddfb)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Sat, 5 Jan 2019 18:07:50 +0000 (21:07 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Sat, 5 Jan 2019 18:07:50 +0000 (21:07 +0300) |
src/editor/g_resources.pas | patch | blob | history |
index 4d636eeadb9489df3ea81eebed7d85289c7c8495..880b7275ed6ded678f95139c45db3fb15cc44dcd 100644 (file)
f.RemoveResource(section, name);
f.AddResource(data, len, name, section);
if FileExists(wad) then
- ASSERT(RenameFile(wad, wad + '.bak'));
+ begin
+ if FileExists(wad + '.bak') then
+ ASSERT(DeleteFile(wad + '.bak'));
+ ASSERT(RenameFile(wad, wad + '.bak'))
+ end;
f.SaveTo(wad);
f.Free;
res := 0
ts.Free;
if FileExists(wad) then
- ASSERT(RenameFile(wad, wad + '.bak'));
+ begin
+ if FileExists(wad + '.bak') then
+ ASSERT(DeleteFile(wad + '.bak'));
+ ASSERT(RenameFile(wad, wad + '.bak'))
+ end;
ASSERT(RenameFile(tmp, wad));
res := 0
end;
ts.Free;
if FileExists(wad) then
- ASSERT(RenameFile(wad, wad + '.bak'));
+ begin
+ if FileExists(wad + '.bak') then
+ ASSERT(DeleteFile(wad + '.bak'));
+ ASSERT(RenameFile(wad, wad + '.bak'))
+ end;
ASSERT(RenameFile(tmp, wad));
res := 0
end;