aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/mail-tools.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index d3071900bc..eefd5c93af 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,8 @@
+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.
+
2001-06-19 Radek Doulik <rodo@ximian.com>
* mail-format.c (write_field_row_begin): add column with &nbsp;
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;
}