Update of /cvsroot/mahogany/M/src/mail
In directory sc8-pr-cvs1:/tmp/cvs-serv13703/src/mail

Modified Files:
        SendMessageCC.cpp 
Log Message:
Don't create temporary file twice

Index: SendMessageCC.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/mail/SendMessageCC.cpp,v
retrieving revision 1.219
retrieving revision 1.220
diff -b -u -2 -r1.219 -r1.220
--- SendMessageCC.cpp   16 Oct 2003 10:23:45 -0000      1.219
+++ SendMessageCC.cpp   16 Oct 2003 13:31:44 -0000      1.220
@@ -1712,16 +1712,11 @@
 
             // write to temp file:
-            const String filename = wxFileName::CreateTempFileName(_T("Mtemp"));
+            wxFile out;
+            const String filename = wxFileName::CreateTempFileName(
+               _T("Mtemp"), &out);
 
             bool success = false;
             if ( !filename.empty() )
             {
-               wxFile out;
-
-               // don't overwrite because someone could have created file with "bad"
-               // (i.e. world readable) permissions in the meanwhile
-               if ( out.Create(filename, FALSE /* don't overwrite */,
-                               wxS_IRUSR | wxS_IWUSR) )
-               {
                   size_t written = out.Write(lfOnly, lfOnly.Length());
                   out.Close();
@@ -1740,5 +1735,4 @@
                      argv[3] = 0;  // NULL
                      success = wxExecute(argv) != 0;
-                  }
                }
             }



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to