aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2004-02-14 03:47:31 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-02-14 03:47:31 +0800
commit86acc090af54e117c43072b7863b0835916073e5 (patch)
tree6e0955f7a170561075e8ba097b4b4d946e539df8
parentfdacdc0bb9a57096680d44ff92aa24ff997bbff4 (diff)
downloadgsoc2013-evolution-86acc090af54e117c43072b7863b0835916073e5.tar
gsoc2013-evolution-86acc090af54e117c43072b7863b0835916073e5.tar.gz
gsoc2013-evolution-86acc090af54e117c43072b7863b0835916073e5.tar.bz2
gsoc2013-evolution-86acc090af54e117c43072b7863b0835916073e5.tar.lz
gsoc2013-evolution-86acc090af54e117c43072b7863b0835916073e5.tar.xz
gsoc2013-evolution-86acc090af54e117c43072b7863b0835916073e5.tar.zst
gsoc2013-evolution-86acc090af54e117c43072b7863b0835916073e5.zip
Make sure the drop-target folder doesn't already contain a folder named
2004-02-13 Jeffrey Stedfast <fejj@ximian.com> * 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
-rw-r--r--mail/ChangeLog7
-rw-r--r--mail/em-folder-tree.c8
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 <fejj@ximian.com>
+
+ * 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 <rodo@ximian.com>
* 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);