Patch that fixes one issue when removing folders
- From: Sergio Villar Senin <svillar igalia com>
- To: tinymail-devel-list gnome org
- Subject: Patch that fixes one issue when removing folders
- Date: Tue, 18 Sep 2007 13:52:53 +0200
Hi,
I noticed that when moving a folder from one folder store to another the
old folder store still thought that the moved folder was his child (for
example when asking for child folders with tny_folder_store_get_folders)
The problem was that the CamelFolderInfo object located in priv->info
was still there and was not regenerated after the move, so it kept
caching the old children.
Find attached the patch that fixes it.
Br
Index: tny-camel-folder.c
===================================================================
--- tny-camel-folder.c (revision 2789)
+++ tny-camel-folder.c (working copy)
@@ -3145,6 +3145,7 @@
*
* unload_folder_no_lock (priv, FALSE);
**/
+ succeeded = TRUE;
g_static_rec_mutex_unlock (priv->folder_lock);
}
@@ -3156,6 +3157,19 @@
g_slice_free (CpyRecRet, cpyr);
}
+ if (succeeded) {
+ TnyFolderStore *folder_store = tny_folder_get_folder_store (self);
+
+ if (TNY_IS_ACCOUNT (folder_store)) {
+ TnyCamelStoreAccountPriv *apriv = TNY_CAMEL_STORE_ACCOUNT_GET_PRIVATE (folder_store);
+ apriv->iter = NULL;
+ } else if (TNY_IS_FOLDER (folder_store)) {
+ TnyCamelFolderPriv *ppriv = TNY_CAMEL_FOLDER_GET_PRIVATE (folder_store);
+ ppriv->iter = NULL;
+ }
+ g_object_unref (folder_store);
+ }
+
if (tried && terr)
g_propagate_error (err, terr);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]