diff options
author | Not Zed <NotZed@Ximian.com> | 2004-01-30 12:37:28 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-01-30 12:37:28 +0800 |
commit | c6e8df106b860b5b99c0e91055453e1f67fe834d (patch) | |
tree | 1d877b3f96ddef4ea7c269d7a0df924a8f19a061 /camel/camel-store.c | |
parent | dab1c82a2155a56ae2444108b4182bb7c19d4889 (diff) | |
download | gsoc2013-evolution-c6e8df106b860b5b99c0e91055453e1f67fe834d.tar.gz 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
Diffstat (limited to 'camel/camel-store.c')
-rw-r--r-- | camel/camel-store.c | 6 |
1 files changed, 5 insertions, 1 deletions
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); } |