aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog4
-rw-r--r--mail/em-migrate.c8
2 files changed, 8 insertions, 4 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 717322f11e..e44abda8e2 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,9 @@
2004-04-08 Jeffrey Stedfast <fejj@ximian.com>
+ * em-migrate.c (cp_r): Now takes a pattern argument to limit files
+ that get copied over (so we can limit imap cache to only the
+ summary files - makes it faster).
+
* mail-account-gui.c (mail_account_gui_build_extra_conf): Fixed up
a bit to look nicer and make it closer to HIG compliant.
diff --git a/mail/em-migrate.c b/mail/em-migrate.c
index 2bd54e0ca6..d2cd7f31f3 100644
--- a/mail/em-migrate.c
+++ b/mail/em-migrate.c
@@ -1364,7 +1364,7 @@ cp (const char *src, const char *dest, gboolean show_progress)
}
static int
-cp_r (const char *src, const char *dest)
+cp_r (const char *src, const char *dest, const char *pattern)
{
GString *srcpath, *destpath;
struct dirent *dent;
@@ -1400,8 +1400,8 @@ cp_r (const char *src, const char *dest)
continue;
if (S_ISDIR (st.st_mode)) {
- cp_r (srcpath->str, destpath->str);
- } else {
+ cp_r (srcpath->str, destpath->str, pattern);
+ } else if (!pattern || !strcmp (dent->d_name, pattern)) {
cp (srcpath->str, destpath->str, FALSE);
}
}
@@ -1970,7 +1970,7 @@ em_migrate_imap_caches_1_4 (const char *evolution_dir, CamelException *ex)
dest = g_build_filename (evolution_dir, "mail", "imap", NULL);
/* we don't care if this fails, it's only a cache... */
- rename (src, dest);
+ cp_r (src, dest, "summary");
g_free (dest);
g_free (src);