aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-01-30 12:37:28 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-01-30 12:37:28 +0800
commitc6e8df106b860b5b99c0e91055453e1f67fe834d (patch)
tree1d877b3f96ddef4ea7c269d7a0df924a8f19a061
parentdab1c82a2155a56ae2444108b4182bb7c19d4889 (diff)
downloadgsoc2013-evolution-c6e8df106b860b5b99c0e91055453e1f67fe834d.tar
gsoc2013-evolution-c6e8df106b860b5b99c0e91055453e1f67fe834d.tar.gz
gsoc2013-evolution-c6e8df106b860b5b99c0e91055453e1f67fe834d.tar.bz2
gsoc2013-evolution-c6e8df106b860b5b99c0e91055453e1f67fe834d.tar.lz
gsoc2013-evolution-c6e8df106b860b5b99c0e91055453e1f67fe834d.tar.xz
gsoc2013-evolution-c6e8df106b860b5b99c0e91055453e1f67fe834d.tar.zst
gsoc2013-evolution-c6e8df106b860b5b99c0e91055453e1f67fe834d.zip
copy the old_name that comes in, since it might be the actual folder_name,
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. svn path=/trunk/; revision=24532
-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);
}