aboutsummaryrefslogtreecommitdiff
path: root/butl/fdstream
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-01-24 14:41:33 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-01-24 14:41:33 +0200
commit59fc5d5cc5341e0505216c17405af995116ebb3b (patch)
tree449756d087f741cd8606f532a4e4e2f03feba33e /butl/fdstream
parent7d3b0739ff49c10a6703c7625ade42dfe72976fe (diff)
Flush buffer before closing file in ofdstream
Diffstat (limited to 'butl/fdstream')
-rw-r--r--butl/fdstream2
1 files changed, 1 insertions, 1 deletions
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 ();}
};