aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2009-06-21 20:57:03 +0000
committerVincent Richard <[email protected]>2009-06-21 20:57:03 +0000
commit43bbb3c41056e085aaff88f93c75622d1a70ecd4 (patch)
tree51f57ffc6659c0bc62eab5f613c1aeeb3245e934 /src
parentFixed dynamic_cast support detection on HPUX (aCC). (diff)
downloadvmime-43bbb3c41056e085aaff88f93c75622d1a70ecd4.tar.gz
vmime-43bbb3c41056e085aaff88f93c75622d1a70ecd4.zip
Check return status of fsync (Georg Sauthoff).
Diffstat (limited to 'src')
-rw-r--r--src/platforms/posix/posixFile.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/platforms/posix/posixFile.cpp b/src/platforms/posix/posixFile.cpp
index b371fe73..d04ebc25 100644
--- a/src/platforms/posix/posixFile.cpp
+++ b/src/platforms/posix/posixFile.cpp
@@ -126,7 +126,8 @@ void posixFileWriterOutputStream::write(const value_type* const data, const size
void posixFileWriterOutputStream::flush()
{
- ::fsync(m_fd);
+ if (::fsync(m_fd) == -1)
+ posixFileSystemFactory::reportError(m_path, errno);
}