aboutsummaryrefslogtreecommitdiffstats
path: root/src/platforms/posix/posixFile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/platforms/posix/posixFile.cpp')
-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);
}