diff options
author | Jon Trowbridge <trow@ximian.com> | 2001-06-09 00:38:05 +0800 |
---|---|---|
committer | Jon Trowbridge <trow@src.gnome.org> | 2001-06-09 00:38:05 +0800 |
commit | 4677f26be4d870ff66a9a80e92742bc72fe68042 (patch) | |
tree | 3a4f33f1d9f880b6c7197c82b017283480ea0836 | |
parent | fa00be05bf00e1c1197724f754ce4aca5a334342 (diff) | |
download | gsoc2013-evolution-4677f26be4d870ff66a9a80e92742bc72fe68042.tar gsoc2013-evolution-4677f26be4d870ff66a9a80e92742bc72fe68042.tar.gz gsoc2013-evolution-4677f26be4d870ff66a9a80e92742bc72fe68042.tar.bz2 gsoc2013-evolution-4677f26be4d870ff66a9a80e92742bc72fe68042.tar.lz gsoc2013-evolution-4677f26be4d870ff66a9a80e92742bc72fe68042.tar.xz gsoc2013-evolution-4677f26be4d870ff66a9a80e92742bc72fe68042.tar.zst gsoc2013-evolution-4677f26be4d870ff66a9a80e92742bc72fe68042.zip |
If you had multiple accounts that used mboxes, and if you received mail in
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.
svn path=/trunk/; revision=10155
-rw-r--r-- | mail/ChangeLog | 10 | ||||
-rw-r--r-- | mail/mail-tools.c | 13 |
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 * |