summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/fwpatcher/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/fwpatcher/main.c b/tools/fwpatcher/main.c
index ca11fbaefd..0d0cc1956f 100644
--- a/tools/fwpatcher/main.c
+++ b/tools/fwpatcher/main.c
@@ -235,7 +235,7 @@ int PatchFirmware()
DeleteFile(name1);
DeleteFile(name2);
/* all is fine, rename the patched file to original name of the firmware */
- if (MoveFileEx(name3, fn, MOVEFILE_COPY_ALLOWED | MOVEFILE_REPLACE_EXISTING)) {
+ if (DeleteFile(fn) && MoveFile(name3, fn)) {
return 1;
}
else {