aboutsummaryrefslogtreecommitdiff
path: root/main.h
diff options
context:
space:
mode:
authors_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2009-11-05 04:41:36 +0000
committers_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2009-11-05 04:41:36 +0000
commitfba40889418cb1861440a3fdccee048c69f0fb89 (patch)
tree8b82ec196f05e1297dd87e0d857507f8ea1cf975 /main.h
parentf7d3cc0e584e7184b9f5cd9736d34f41c5e70182 (diff)
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
Diffstat (limited to 'main.h')
-rw-r--r--main.h8
1 files changed, 8 insertions, 0 deletions
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;
}