From 59fc5d5cc5341e0505216c17405af995116ebb3b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 24 Jan 2016 14:41:33 +0200 Subject: Flush buffer before closing file in ofdstream --- butl/fdstream | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'butl/fdstream') diff --git a/butl/fdstream b/butl/fdstream index ac4500a..3f96f57 100644 --- a/butl/fdstream +++ b/butl/fdstream @@ -103,7 +103,7 @@ namespace butl ofdstream (): std::ostream (&buf_) {} ofdstream (int fd): fdstream_base (fd), std::ostream (&buf_) {} - void close () {buf_.close ();} + void close () {flush (); buf_.close ();} void open (int fd) {buf_.open (fd);} bool is_open () const {return buf_.is_open ();} }; -- cgit v1.1