diff options
author | Jason Leach <jleach@ximian.com> | 2001-08-11 02:25:31 +0800 |
---|---|---|
committer | Jacob Leach <jleach@src.gnome.org> | 2001-08-11 02:25:31 +0800 |
commit | 854fb9e9b0d6a603f4167b7fafe2a59854bdbec5 (patch) | |
tree | e3e8b53236cfbeb822cc4e08e93ff7b35fb065d4 /mail/mail-folder-cache.c | |
parent | 7bad37e711be4c31e8880f28f067f046ac40aa33 (diff) | |
download | gsoc2013-evolution-854fb9e9b0d6a603f4167b7fafe2a59854bdbec5.tar gsoc2013-evolution-854fb9e9b0d6a603f4167b7fafe2a59854bdbec5.tar.gz gsoc2013-evolution-854fb9e9b0d6a603f4167b7fafe2a59854bdbec5.tar.bz2 gsoc2013-evolution-854fb9e9b0d6a603f4167b7fafe2a59854bdbec5.tar.lz gsoc2013-evolution-854fb9e9b0d6a603f4167b7fafe2a59854bdbec5.tar.xz gsoc2013-evolution-854fb9e9b0d6a603f4167b7fafe2a59854bdbec5.tar.zst gsoc2013-evolution-854fb9e9b0d6a603f4167b7fafe2a59854bdbec5.zip |
Remove all the messages from a folder that's being deleted before actually
2001-08-10 Jason Leach <jleach@ximian.com>
* mail-ops.c (remove_folder_get): Remove all the messages from a
folder that's being deleted before actually doing the
camel_store_delete_folder, so it won't leave behind an mbox file
that's going to prevent the actual directory from being deleted,
and strange effects like new folders with the same name being made
in it's place. Bug #5618.
* mail-folder-cache.c (mail_folder_cache_remove_folder): New
function, a way to get something out of the folder cache, like
folders being deleted. Bug #6878.
svn path=/trunk/; revision=11887
Diffstat (limited to 'mail/mail-folder-cache.c')
-rw-r--r-- | mail/mail-folder-cache.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c index 208b231e40..9e7d0f2e0f 100644 --- a/mail/mail-folder-cache.c +++ b/mail/mail-folder-cache.c @@ -574,6 +574,24 @@ mail_folder_cache_set_update_lstorage (const gchar *uri, } void +mail_folder_cache_remove_folder (const gchar *uri) +{ + if (uri && *uri) { + mail_folder_info *mfi; + + mfi = g_hash_table_lookup (folders, uri); + + /* Free everything we've allocated for this folder info */ + g_free (mfi->uri); + g_free (mfi->path); + g_free (mfi->name); + + /* Remove it from the hash */ + g_hash_table_remove (folders, uri); + } +} + +void mail_folder_cache_note_folder (const gchar *uri, CamelFolder *folder) { mail_folder_info *mfi; |