aboutsummaryrefslogtreecommitdiff
path: root/src/ca/XmlFile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ca/XmlFile.cpp')
-rw-r--r--src/ca/XmlFile.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/ca/XmlFile.cpp b/src/ca/XmlFile.cpp
index 95f18411..04a4ae98 100644
--- a/src/ca/XmlFile.cpp
+++ b/src/ca/XmlFile.cpp
@@ -854,7 +854,6 @@ extern "C" UINT __stdcall ExecXmlFileRollback(
854 LPWSTR pwzFileName = NULL; 854 LPWSTR pwzFileName = NULL;
855 LPBYTE pbData = NULL; 855 LPBYTE pbData = NULL;
856 DWORD_PTR cbData = 0; 856 DWORD_PTR cbData = 0;
857 DWORD cbDataWritten = 0;
858 857
859 FILETIME ft; 858 FILETIME ft;
860 859
@@ -913,10 +912,8 @@ extern "C" UINT __stdcall ExecXmlFileRollback(
913 ExitOnInvalidHandleWithLastError(hFile, hr, "failed to open file: %ls", pwzFileName); 912 ExitOnInvalidHandleWithLastError(hFile, hr, "failed to open file: %ls", pwzFileName);
914 913
915 // Write out the old data 914 // Write out the old data
916 if (!::WriteFile(hFile, pbData, (DWORD)cbData, &cbDataWritten, NULL)) 915 hr = FileWriteHandle(hFile, pbData, cbData);
917 ExitOnLastError(hr, "failed to write to file: %ls", pwzFileName); 916 ExitOnFailure(hr, "failed to write to file: %ls", pwzFileName);
918
919 Assert(cbData == cbDataWritten);
920 917
921 ReleaseFile(hFile); 918 ReleaseFile(hFile);
922 919