aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-ops.c
diff options
context:
space:
mode:
authorTor Lillqvist <tml@novell.com>2005-12-18 01:39:11 +0800
committerTor Lillqvist <tml@src.gnome.org>2005-12-18 01:39:11 +0800
commit69ac3007d9e82975c2152d7a4e3fdb0b6c42f48e (patch)
tree8bc51ba5c84d3fc4ab8e127d230620bd75a60796 /mail/mail-ops.c
parent35c2baaba31bd232df0f78102cb9da650db3e3ae (diff)
downloadgsoc2013-evolution-69ac3007d9e82975c2152d7a4e3fdb0b6c42f48e.tar
gsoc2013-evolution-69ac3007d9e82975c2152d7a4e3fdb0b6c42f48e.tar.gz
gsoc2013-evolution-69ac3007d9e82975c2152d7a4e3fdb0b6c42f48e.tar.bz2
gsoc2013-evolution-69ac3007d9e82975c2152d7a4e3fdb0b6c42f48e.tar.lz
gsoc2013-evolution-69ac3007d9e82975c2152d7a4e3fdb0b6c42f48e.tar.xz
gsoc2013-evolution-69ac3007d9e82975c2152d7a4e3fdb0b6c42f48e.tar.zst
gsoc2013-evolution-69ac3007d9e82975c2152d7a4e3fdb0b6c42f48e.zip
Use gstdio wrappers. Open file in binary mode.
2005-12-13 Tor Lillqvist <tml@novell.com> * mail-ops.c: Use gstdio wrappers. Open file in binary mode. svn path=/trunk/; revision=30836
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r--mail/mail-ops.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 5ed2e74f92..99354ce47a 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -24,18 +24,18 @@
* USA
*/
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
-
#include <string.h>
#include <errno.h>
+
+#include <glib.h>
+#include <glib/gstdio.h>
+
#include <libgnome/gnome-exec.h>
-#include <e-util/e-util.h>
#include <libgnome/gnome-i18n.h>
#include <camel/camel-mime-filter-from.h>
@@ -52,19 +52,20 @@
#include <camel/camel-transport.h>
#include <camel/camel-multipart.h>
-#include "mail-component.h"
-#include "mail-config.h"
-#include "mail-tools.h"
-#include "mail-ops.h"
-#include "mail-vfolder.h"
-#include "mail-session.h"
#include "composer/e-msg-composer.h"
-#include "em-filter-rule.h"
-
-#include "mail-mt.h"
+#include "e-util/e-util.h"
+#include "e-util/e-util-private.h"
+#include "em-filter-rule.h"
#include "em-utils.h"
+#include "mail-component.h"
+#include "mail-config.h"
+#include "mail-mt.h"
+#include "mail-ops.h"
+#include "mail-session.h"
+#include "mail-tools.h"
+#include "mail-vfolder.h"
#define w(x)
#define d(x)
@@ -289,7 +290,7 @@ fetch_mail_fetch (struct _mail_msg *mm)
camel_folder_thaw (fm->destination);
if (!camel_exception_is_set (&mm->ex))
- unlink (path);
+ g_unlink (path);
}
g_free (path);
} else {
@@ -1983,7 +1984,7 @@ save_messages_save (struct _mail_msg *mm)
int fd, i;
char *from;
- fd = open (m->path, O_WRONLY | O_CREAT | O_TRUNC, 0666);
+ fd = g_open (m->path, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0666);
if (fd == -1) {
camel_exception_setv(&mm->ex, CAMEL_EXCEPTION_SYSTEM,
_("Unable to create output file: %s\n %s"), m->path, strerror(errno));