VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/Library/CommonLib
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2019-01-18 16:37:39 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2019-03-21 20:59:26 +0100
commitddaa8ae47a58317cf677a62c4beef62279d4a4da (patch)
tree345ace188593823f11a54450970db5d7d373762e /Library/CommonLib
parente4325a04fd9b105991be2293fb28ca0f01fb4328 (diff)
downloadVeraCrypt-DCS-ddaa8ae47a58317cf677a62c4beef62279d4a4da.tar.gz
VeraCrypt-DCS-ddaa8ae47a58317cf677a62c4beef62279d4a4da.zip
Fix bug in file copy operation by deleting destination file first if it already exists
Diffstat (limited to 'Library/CommonLib')
-rw-r--r--Library/CommonLib/EfiFile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Library/CommonLib/EfiFile.c b/Library/CommonLib/EfiFile.c
index 4839eae..8a9d6d7 100644
--- a/Library/CommonLib/EfiFile.c
+++ b/Library/CommonLib/EfiFile.c
@@ -378,7 +378,8 @@ FileCopy(
res = EFI_BUFFER_TOO_SMALL;
goto copyerr;
}
-
+
+ FileDelete (dstroot, dst);
res = FileOpen(dstroot, dst, &dstfile, EFI_FILE_MODE_CREATE | EFI_FILE_MODE_WRITE | EFI_FILE_MODE_READ, 0);
if (EFI_ERROR(res)) goto copyerr;