Bug 472865 - umask for emails saved as a file are not respecting system umask. r=standard8
authorMagnus Melin <mkmelin+mozilla@iki.fi>
Wed, 20 Feb 2013 21:49:25 +0200
changeset 15028 62db600f84f1c4623be8194c415bebfe8cad366e
parent 15027 4e99a6a55f80efeb09a27ce53bd040b304741dc7
child 15029 33a80322430e71685709f3b26b1c95b96d6d8a19
push id898
push userbugzilla@standard8.plus.com
push dateMon, 13 May 2013 17:03:31 +0000
treeherdercomm-beta@3106694b14de [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersstandard8
bugs472865
Bug 472865 - umask for emails saved as a file are not respecting system umask. r=standard8
mailnews/base/util/nsMsgMailNewsUrl.cpp
--- a/mailnews/base/util/nsMsgMailNewsUrl.cpp
+++ b/mailnews/base/util/nsMsgMailNewsUrl.cpp
@@ -918,17 +918,17 @@ nsresult nsMsgSaveAsListener::SetupMsgWr
   // object, thus creating an empty file. Actual save operations for
   // IMAP and NNTP use this nsMsgSaveAsListener here, though, so we
   // have to close the stream before deleting the file, else data
   // would still be written happily into a now non-existing file.
   // (Windows doesn't care, btw, just unixoids do...)
   aFile->Remove(false);
 
   nsresult rv = MsgNewBufferedFileOutputStream(getter_AddRefs(m_outputStream),
-                                               aFile, -1, 00600);
+                                               aFile, -1, 0666);
   NS_ENSURE_SUCCESS(rv, rv);
 
   if (m_outputStream && addDummyEnvelope)
   {
     nsAutoCString result;
     uint32_t writeCount;
 
     time_t now = time((time_t*) 0);