From 228ce7f0aa21e47a1855d592af33c59bcce04946 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Tue, 21 Dec 2004 12:36:18 +0000 Subject: [PATCH] Fixed open() flags when writing to file. --- src/platforms/posix/file.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platforms/posix/file.cpp b/src/platforms/posix/file.cpp index a920162d..f46b09ec 100644 --- a/src/platforms/posix/file.cpp +++ b/src/platforms/posix/file.cpp @@ -186,7 +186,7 @@ vmime::utility::outputStream* posixFileWriter::getOutputStream() { int fd = 0; - if ((fd = ::open(m_nativePath.c_str(), O_RDONLY, 0660)) == -1) + if ((fd = ::open(m_nativePath.c_str(), O_WRONLY, 0660)) == -1) posixFileSystemFactory::reportError(m_path, errno); return new posixFileWriterOutputStream(m_path, fd);