updater: Don't force file flushes when writing new files

Using FILE_FLAG_WRITE_THROUGH causes a flush to disk on each file which
is bad for performance.
This commit is contained in:
Richard Stanway
2026-02-10 17:46:18 -05:00
committed by Ryan Foster
parent 95bfb81f69
commit 1866f8c1e6
+1 -1
View File
@@ -217,7 +217,7 @@ static string QuickReadFile(const wchar_t *path)
static bool QuickWriteFile(const wchar_t *file, const void *data, size_t size)
try {
WinHandle handle = CreateFile(file, GENERIC_WRITE, 0, nullptr, CREATE_ALWAYS, FILE_FLAG_WRITE_THROUGH, nullptr);
WinHandle handle = CreateFile(file, GENERIC_WRITE, 0, nullptr, CREATE_ALWAYS, 0, nullptr);
if (handle == INVALID_HANDLE_VALUE)
throw LastError();