aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-10-17 06:06:01 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-10-17 06:06:01 +0800
commit71259e72512beb2a18c23e288c2f8ad4721f7c40 (patch)
tree8509824690c519689fa361f40c4afe8df4ba8c14
parentfac0dbd69c7d8a6807d51cc12615de88b7a900be (diff)
downloadgsoc2013-evolution-71259e72512beb2a18c23e288c2f8ad4721f7c40.tar.gz
gsoc2013-evolution-71259e72512beb2a18c23e288c2f8ad4721f7c40.tar.zst
gsoc2013-evolution-71259e72512beb2a18c23e288c2f8ad4721f7c40.zip
Lets put the UID cache in ~/evolution/mail/pop3 as this makes more sense
2001-10-16 Jeffrey Stedfast <fejj@ximian.com> * mail-ops.c (uid_cachename_hack): Lets put the UID cache in ~/evolution/mail/pop3 as this makes more sense than ~/mail/config does. Perform checking to see what flavor cache-path the user is on and compensate. svn path=/trunk/; revision=13708
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/mail-ops.c24
2 files changed, 27 insertions, 2 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index f8315faacd..c5b53ead0a 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,10 @@
2001-10-16 Jeffrey Stedfast <fejj@ximian.com>
+ * mail-ops.c (uid_cachename_hack): Lets put the UID cache in
+ ~/evolution/mail/pop3 as this makes more sense than ~/mail/config
+ does. Perform checking to see what flavor cache-path the user is
+ on and compensate.
+
* message-list.c (on_cursor_activated_idle): Check that the
cursor_uid is non-NULL before emitting a "message_selected"
signal. Fixes bug #6015.
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index dd365b3fb5..e0d9836987 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -209,7 +209,8 @@ static char *
uid_cachename_hack (CamelStore *store)
{
CamelURL *url = CAMEL_SERVICE (store)->url;
- char *encoded_url, *filename;
+ char *encoded_url, *filename, *old_location;
+ struct stat st;
encoded_url = g_strdup_printf ("pop://%s%s%s@%s/", url->user,
url->authmech ? ";auth=" : "",
@@ -217,7 +218,26 @@ uid_cachename_hack (CamelStore *store)
url->host);
e_filename_make_safe (encoded_url);
- filename = g_strdup_printf ("%s/config/cache-%s", evolution_dir, encoded_url);
+ filename = g_strdup_printf ("%s/mail/pop3/cache-%s", evolution_dir, encoded_url);
+
+ /* lame hack, but we can't expect user's to actually migrate
+ their cache files - brain power requirements are too
+ high. */
+ if (stat (filename, &st) == -1) {
+ /* This is either the first time the user has checked
+ mail with this POP provider or else their cache
+ file is in the old location... */
+ old_location = g_strdup_printf ("%s/config/cache-%s", evolution_dir, encoded_url);
+ if (stat (old_location, &st) == -1) {
+ /* old location doesn't exist either so use the new location */
+ g_free (old_location);
+ } else {
+ /* old location exists, so I guess we use the old cache file location */
+ g_free (filename);
+ filename = old_location;
+ }
+ }
+
g_free (encoded_url);
return filename;
er0.10-removal&id=08ef0f72276785801e0f5184e1ca838716c56eaf'>Presenting GNOME 2.28.1 for FreeBSD. The official release notes for thismarcus2009-11-2910-230/+3 * -Repocopy devel/libtool15 -> libtool22 and libltdl15 -> libltdl22.mezz2009-08-031-1/+1 * - bump all port that indirectly depends on libjpeg and have not yet been bump...dinoex2009-07-311-1/+1 * Presenting GNOME 2.26 for FreeBSD. Seemarcus2009-04-101-2/+3 * Presenting GNOME 2.24 for FreeBSD.marcus2009-01-103-7/+8 * Bump portrevision due to upgrade of devel/gettext.edwin2008-06-061-1/+1 * - Remove unneeded dependency from gtk12/gtk20 [1]miwi2008-04-201-1/+1 * Update to 2.22.1.marcus2008-04-082-5/+4 * Remove some patches which provide the wrong CD device name to apps suchmarcus2008-04-033-41/+3 * The FreeBSD GNOME team is proud to annunce the release of GNOME 2.22.0 formarcus2008-03-2412-190/+172 * Fix a warning seen trying to restore the previous used drive setting.marcus2008-01-062-12/+23 * Presenting GNOME 2.20.1 and all related works for FreeBSD. The officialmarcus2007-10-253-17/+24 * Update to 2.18.2.mezz2007-05-293-5/+7 * - Welcome X.org 7.2 \o/.flz2007-05-20