aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Trowbridge <trow@ximian.com>2001-06-19 23:37:27 +0800
committerJon Trowbridge <trow@src.gnome.org>2001-06-19 23:37:27 +0800
commitee539a72305c0623bfabc498e7b9b1c8b6fe553f (patch)
tree76e51ed768476d5bc73d6f83b540914a8f843d5a
parent8e7415029bed4c4d571b577bf3354b24f9875b98 (diff)
downloadgsoc2013-evolution-ee539a72305c0623bfabc498e7b9b1c8b6fe553f.tar
gsoc2013-evolution-ee539a72305c0623bfabc498e7b9b1c8b6fe553f.tar.gz
gsoc2013-evolution-ee539a72305c0623bfabc498e7b9b1c8b6fe553f.tar.bz2
gsoc2013-evolution-ee539a72305c0623bfabc498e7b9b1c8b6fe553f.tar.lz
gsoc2013-evolution-ee539a72305c0623bfabc498e7b9b1c8b6fe553f.tar.xz
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
-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;
}