From c5dfbee9b7fe1111274be8d33bd208875b9dd048 Mon Sep 17 00:00:00 2001 From: Xadhoom <> Date: Wed, 20 Mar 2019 10:39:34 +0000 Subject: [PATCH] Bugfix --- SourceX/miniwin/misc_io.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/SourceX/miniwin/misc_io.cpp b/SourceX/miniwin/misc_io.cpp index a7e6facf8..00b811815 100644 --- a/SourceX/miniwin/misc_io.cpp +++ b/SourceX/miniwin/misc_io.cpp @@ -138,6 +138,7 @@ WINBOOL CloseHandle(HANDLE hObject) filestream.write(file->buf.data(), file->buf.size()); if (filestream.fail()) throw std::runtime_error("ofstream::write"); + filestream.close(); std::remove(file->path.c_str()); if (std::rename((file->path + ".tmp").c_str(), file->path.c_str())) throw std::runtime_error("rename");