From fba40889418cb1861440a3fdccee048c69f0fb89 Mon Sep 17 00:00:00 2001 From: s_nakamoto Date: Thu, 5 Nov 2009 04:41:36 +0000 Subject: unix build merged in, bitmap resources from xpm instead of rc, better addr relay, better selection of addrs by time last seen for faster connect --- main.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'main.h') diff --git a/main.h b/main.h index a0258cf2ce..6d8f0ed87c 100644 --- a/main.h +++ b/main.h @@ -968,6 +968,14 @@ public: return error("CBlock::WriteToDisk() : ftell failed"); fileout << *this; + // Flush stdio buffers and commit to disk before returning + fflush(fileout); +#ifdef __WXMSW__ + _commit(_fileno(fileout)); +#else + fsync(fileno(fileout)); +#endif + return true; } -- cgit v1.2.3