aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camel/ChangeLog6
-rw-r--r--camel/camel-store.c6
2 files changed, 11 insertions, 1 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index b828328a7d..3753da6f32 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,9 @@
+2004-01-30 Not Zed <NotZed@Ximian.com>
+
+ * camel-store.c (camel_store_rename_folder): copy the old_name
+ that comes in, since it might be the actual folder_name, which
+ will go away during processing. Related to #53123.
+
2004-01-29 Not Zed <NotZed@Ximian.com>
** See bug #53269.
diff --git a/camel/camel-store.c b/camel/camel-store.c
index d547a93d19..c1a63e7582 100644
--- a/camel/camel-store.c
+++ b/camel/camel-store.c
@@ -368,17 +368,20 @@ rename_folder (CamelStore *store, const char *old_name, const char *new_name, Ca
* Rename a named folder to a new name.
**/
void
-camel_store_rename_folder (CamelStore *store, const char *old_name, const char *new_name, CamelException *ex)
+camel_store_rename_folder (CamelStore *store, const char *old_namein, const char *new_name, CamelException *ex)
{
CamelFolder *folder;
int i, oldlen, namelen;
GPtrArray *folders;
+ char *old_name;
d(printf("store rename folder %s '%s' '%s'\n", ((CamelService *)store)->url->protocol, old_name, new_name));
if (strcmp(old_name, new_name) == 0)
return;
+ /* need to save this, since old_namein might be folder->full_name, which could go away */
+ old_name = g_strdup(old_namein);
oldlen = strlen(old_name);
CAMEL_STORE_LOCK(store, folder_lock);
@@ -449,6 +452,7 @@ camel_store_rename_folder (CamelStore *store, const char *old_name, const char *
CAMEL_STORE_UNLOCK(store, folder_lock);
g_ptr_array_free(folders, TRUE);
+ g_free(old_name);
}