[ROSAUTOTEST]
authorColin Finck <colin@reactos.org>
Tue, 14 Aug 2012 20:33:54 +0000 (20:33 +0000)
committerColin Finck <colin@reactos.org>
Tue, 14 Aug 2012 20:33:54 +0000 (20:33 +0000)
Use FILE_FLAG_NO_BUFFERING and FILE_FLAG_WRITE_THROUGH in the hope that they prevent journal changes from getting lost.

svn path=/trunk/; revision=57077

rostests/rosautotest/CJournaledTestList.cpp

index 871f5e9..fea81fc 100644 (file)
@@ -64,7 +64,15 @@ CJournaledTestList::~CJournaledTestList()
 void
 CJournaledTestList::OpenJournal(DWORD DesiredAccess, bool CreateNew)
 {
-    m_hJournal = CreateFileW(m_JournalFile.c_str(), DesiredAccess, 0, NULL, (CreateNew ? CREATE_ALWAYS : OPEN_EXISTING), FILE_ATTRIBUTE_NORMAL, NULL);
+    m_hJournal = CreateFileW(
+        m_JournalFile.c_str(),
+        DesiredAccess,
+        0,
+        NULL,
+        (CreateNew ? CREATE_ALWAYS : OPEN_EXISTING),
+        FILE_ATTRIBUTE_NORMAL | FILE_FLAG_NO_BUFFERING | FILE_FLAG_WRITE_THROUGH,
+        NULL
+    );
 
     if(m_hJournal == INVALID_HANDLE_VALUE)
         FATAL("CreateFileW failed\n");