diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2004-04-09 10:11:09 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2004-04-09 10:11:09 +0800 |
commit | fabe4f1d8ae42c7bf8f1674c98ef4103e2e53bf0 (patch) | |
tree | d38240727078c7a537a01f3b23abf555f390aa9c /mail/em-migrate.c | |
parent | be3def8d200a27d4e5282c8c269ae2c017208cfa (diff) | |
download | gsoc2013-evolution-fabe4f1d8ae42c7bf8f1674c98ef4103e2e53bf0.tar.gz gsoc2013-evolution-fabe4f1d8ae42c7bf8f1674c98ef4103e2e53bf0.tar.zst gsoc2013-evolution-fabe4f1d8ae42c7bf8f1674c98ef4103e2e53bf0.zip |
Now takes a pattern argument to limit files that get copied over (so we
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).
svn path=/trunk/; revision=25378
Diffstat (limited to 'mail/em-migrate.c')
-rw-r--r-- | mail/em-migrate.c | 8 |
1 files changed, 4 insertions, 4 deletions
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); |