aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog10
-rw-r--r--mail/mail-tools.c13
2 files changed, 22 insertions, 1 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index e12cca3bfd..1cbeefbd50 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,13 @@
+2001-06-08 Jon Trowbridge <trow@ximian.com>
+
+ * mail-tools.c (mail_tool_get_local_movemail_path): If you had
+ multiple accounts that used mboxes, and if you received mail in N
+ of those accounts, you would get N copies of each of your e-mail
+ messages. This is because everything was being dumped into one
+ big file by movemail, and the filters would run on that file N
+ times. To work around this, each mbox account now gets its own
+ distinct temporary movemail file.
+
2001-06-07 Jon Trowbridge <trow@ximian.com>
* mail-ops.c (fetch_mail_fetch): Pass the original source URI
diff --git a/mail/mail-tools.c b/mail/mail-tools.c
index abec85f86c..d5966a8993 100644
--- a/mail/mail-tools.c
+++ b/mail/mail-tools.c
@@ -29,6 +29,7 @@
#include <config.h>
#endif
+#include <pthread.h>
#include <ctype.h>
#include <errno.h>
#include "camel/camel.h"
@@ -88,7 +89,17 @@ mail_tool_get_folder_name (CamelFolder *folder)
gchar *
mail_tool_get_local_movemail_path (void)
{
- return g_strdup_printf ("%s/local/Inbox/movemail", evolution_dir);
+ static gint count = 0;
+ static pthread_mutex_t movemail_path_lock = PTHREAD_MUTEX_INITIALIZER;
+ gint my_count;
+
+ /* Ah, the joys of being multi-threaded... */
+ pthread_mutex_lock (&movemail_path_lock);
+ my_count = count;
+ ++count;
+ pthread_mutex_unlock (&movemail_path_lock);
+
+ return g_strdup_printf ("%s/local/Inbox/movemail.%d", evolution_dir, my_count);
}
CamelFolder *