diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2003-09-24 05:25:48 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2003-09-24 05:25:48 +0800 |
commit | 1b5c1357dcbf4cfcd450c33d76c51c2e14252cf8 (patch) | |
tree | c164cd3c68829b39d550a6a99caa1c33a1464d2f | |
parent | 020a8e0361c3641322a62b03912d8e29a06791ba (diff) | |
download | gsoc2013-evolution-1b5c1357dcbf4cfcd450c33d76c51c2e14252cf8.tar gsoc2013-evolution-1b5c1357dcbf4cfcd450c33d76c51c2e14252cf8.tar.gz gsoc2013-evolution-1b5c1357dcbf4cfcd450c33d76c51c2e14252cf8.tar.bz2 gsoc2013-evolution-1b5c1357dcbf4cfcd450c33d76c51c2e14252cf8.tar.lz gsoc2013-evolution-1b5c1357dcbf4cfcd450c33d76c51c2e14252cf8.tar.xz gsoc2013-evolution-1b5c1357dcbf4cfcd450c33d76c51c2e14252cf8.tar.zst gsoc2013-evolution-1b5c1357dcbf4cfcd450c33d76c51c2e14252cf8.zip |
Don't xmlFree (name) until after we've g_strdup'd it. (em_migrate_dir): If
2003-09-23 Jeffrey Stedfast <fejj@ximian.com>
* evolution-mbox-upgrade.c (get_local_store): Don't xmlFree (name)
until after we've g_strdup'd it.
(em_migrate_dir): If the metadata file doesn't exist, don't even
bother trying subfolers (the shell just ignores them so we should
too).
svn path=/trunk/; revision=22679
-rw-r--r-- | mail/ChangeLog | 5 | ||||
-rw-r--r-- | mail/evolution-mbox-upgrade.c | 26 |
2 files changed, 23 insertions, 8 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 11c7519767..97dc2f416d 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -2,6 +2,11 @@ * evolution-mbox-upgrade.c (get_local_store): Don't xmlFree (name) until after we've g_strdup'd it. + (em_migrate_dir): If the metadata file doesn't exist, don't even + bother trying subfolers (the shell just ignores them so we should + too). + +2003-09-23 Jeffrey Stedfast <fejj@ximian.com> Fix for bug #48791 (and also fixes a FIXME) diff --git a/mail/evolution-mbox-upgrade.c b/mail/evolution-mbox-upgrade.c index 92a2844034..8d8c76cdc8 100644 --- a/mail/evolution-mbox-upgrade.c +++ b/mail/evolution-mbox-upgrade.c @@ -102,14 +102,10 @@ em_migrate_session_new (const char *path) static gboolean is_mail_folder (const char *metadata) { - struct stat st; xmlNodePtr node; xmlDocPtr doc; char *type; - if (stat (metadata, &st) == -1 || !S_ISREG (st.st_mode)) - return FALSE; - if (!(doc = xmlParseFile (metadata))) { g_warning ("Cannot parse `%s'", metadata); return FALSE; @@ -229,8 +225,14 @@ em_migrate_dir (EMMigrateSession *session, const char *dirname, const char *full DIR *dir; path = g_strdup_printf ("%s/folder-metadata.xml", dirname); + if (stat (path, &st) == -1 || !S_ISREG (st.st_mode)) { + g_free (path); + return; + } + if (!is_mail_folder (path)) { g_free (path); + goto try_subdirs; } @@ -244,7 +246,9 @@ em_migrate_dir (EMMigrateSession *session, const char *dirname, const char *full g_warning ("error opening old store for `%s': %s", full_name, ex.desc); camel_exception_clear (&ex); g_free (path); - return; + + /* try subfolders anyway? */ + goto try_subdirs; } g_free (path); @@ -254,7 +258,9 @@ em_migrate_dir (EMMigrateSession *session, const char *dirname, const char *full camel_object_unref (local_store); camel_exception_clear (&ex); g_free (name); - return; + + /* try subfolders anyway? */ + goto try_subdirs; } g_free (name); @@ -265,7 +271,9 @@ em_migrate_dir (EMMigrateSession *session, const char *dirname, const char *full camel_object_unref (local_store); camel_object_unref (old_folder); camel_exception_clear (&ex); - return; + + /* try subfolders anyway? */ + goto try_subdirs; } uids = camel_folder_get_uids (old_folder); @@ -278,7 +286,9 @@ em_migrate_dir (EMMigrateSession *session, const char *dirname, const char *full camel_object_unref (old_folder); camel_object_unref (new_folder); camel_exception_clear (&ex); - return; + + /* try subfolders anyway? */ + goto try_subdirs; } /*camel_object_unref (local_store);*/ |