diff options
author | Jon Trowbridge <trow@ximian.com> | 2001-06-19 23:37:27 +0800 |
---|---|---|
committer | Jon Trowbridge <trow@src.gnome.org> | 2001-06-19 23:37:27 +0800 |
commit | ee539a72305c0623bfabc498e7b9b1c8b6fe553f (patch) | |
tree | 76e51ed768476d5bc73d6f83b540914a8f843d5a /mail/mail-tools.c | |
parent | 8e7415029bed4c4d571b577bf3354b24f9875b98 (diff) | |
download | gsoc2013-evolution-ee539a72305c0623bfabc498e7b9b1c8b6fe553f.tar.gz gsoc2013-evolution-ee539a72305c0623bfabc498e7b9b1c8b6fe553f.tar.zst gsoc2013-evolution-ee539a72305c0623bfabc498e7b9b1c8b6fe553f.zip |
Properly clean up the movemail files when no mail was received.
2001-06-19 Jon Trowbridge <trow@ximian.com>
* mail-tools.c (mail_tool_do_movemail): Properly clean up the
movemail files when no mail was received.
svn path=/trunk/; revision=10290
Diffstat (limited to 'mail/mail-tools.c')
-rw-r--r-- | mail/mail-tools.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mail/mail-tools.c b/mail/mail-tools.c index c6cb3c9685..18b1a0f742 100644 --- a/mail/mail-tools.c +++ b/mail/mail-tools.c @@ -29,6 +29,7 @@ #include <config.h> #endif +#include <unistd.h> #include <pthread.h> #include <ctype.h> #include <errno.h> @@ -173,6 +174,7 @@ mail_tool_do_movemail (const gchar *source_url, CamelException *ex) camel_movemail (source, dest_path, ex); if (stat (dest_path, &sb) < 0 || sb.st_size == 0) { + unlink (dest_path); /* Clean up the movemail.foo file. */ g_free (dest_path); return NULL; } |