From 86acc090af54e117c43072b7863b0835916073e5 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Fri, 13 Feb 2004 19:47:31 +0000 Subject: Make sure the drop-target folder doesn't already contain a folder named 2004-02-13 Jeffrey Stedfast * em-folder-tree.c (emft_drop_folder): Make sure the drop-target folder doesn't already contain a folder named identical to the one we are dropping by using the new CAMEL_STORE_FOLDER_EXCL flag. Fixes bug #53810. svn path=/trunk/; revision=24739 --- mail/ChangeLog | 7 +++++++ mail/em-folder-tree.c | 8 +++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/mail/ChangeLog b/mail/ChangeLog index 3814ba1121..f63c8dc46b 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,10 @@ +2004-02-13 Jeffrey Stedfast + + * em-folder-tree.c (emft_drop_folder): Make sure the drop-target + folder doesn't already contain a folder named identical to the one + we are dropping by using the new CAMEL_STORE_FOLDER_EXCL + flag. Fixes bug #53810. + 2004-02-13 Radek Doulik * evolution-mail.schemas.in.in: added defaults for composer diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c index 85c3302a87..f86c6ef94c 100644 --- a/mail/em-folder-tree.c +++ b/mail/em-folder-tree.c @@ -707,11 +707,11 @@ emft_drop_folder(struct _DragDataReceivedAsync *m) m->moved = !camel_exception_is_set (&m->msg.ex); } else { CamelFolder *dest; - + /* FIXME: should check we're not coming from a vfolder, otherwise bad stuff could happen */ /* copy the folder to the new location */ - if ((dest = camel_store_get_folder(m->store, new_name, CAMEL_STORE_FOLDER_CREATE, &m->msg.ex))) { + if ((dest = camel_store_get_folder(m->store, new_name, CAMEL_STORE_FOLDER_CREATE_EXCL, &m->msg.ex))) { GPtrArray *uids; uids = camel_folder_get_uids (src); @@ -900,8 +900,6 @@ tree_drag_data_received(GtkWidget *widget, GdkDragContext *context, int x, int y if (!gtk_tree_view_get_dest_row_at_pos (priv->treeview, x, y, &dest_path, &pos)) return; - /*em_folder_tree_model_drag_data_received (priv->model, context, path, selection, info);*/ - /* this means we are receiving no data */ if (!selection->data || selection->length == -1) { gtk_drag_finish(context, FALSE, FALSE, GDK_CURRENT_TIME); @@ -924,7 +922,7 @@ tree_drag_data_received(GtkWidget *widget, GdkDragContext *context, int x, int y } full_name = path[0] == '/' ? path + 1 : path; - + m = mail_msg_new (&emft_drop_async_op, NULL, sizeof (struct _DragDataReceivedAsync)); m->context = context; g_object_ref(context); -- cgit