From ee539a72305c0623bfabc498e7b9b1c8b6fe553f Mon Sep 17 00:00:00 2001 From: Jon Trowbridge Date: Tue, 19 Jun 2001 15:37:27 +0000 Subject: Properly clean up the movemail files when no mail was received. 2001-06-19 Jon Trowbridge * mail-tools.c (mail_tool_do_movemail): Properly clean up the movemail files when no mail was received. svn path=/trunk/; revision=10290 --- mail/mail-tools.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mail/mail-tools.c') 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 #endif +#include #include #include #include @@ -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; } -- cgit