Commit e218446d authored by Alexander Larsson's avatar Alexander Larsson Committed by Alexander Larsson

Duplicate if src and dest dirs are the same (#512392)

2008-02-20  Alexander Larsson  <alexl@redhat.com>

        * libnautilus-private/nautilus-file-operations.c:
	Duplicate if src and dest dirs are the same (#512392)


svn path=/trunk/; revision=13781
parent 9cf3302b
2008-02-20 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-file-operations.c:
Duplicate if src and dest dirs are the same (#512392)
2008-02-20 Alexander Larsson <alexl@redhat.com>
* src/nautilus-main.c:
......
......@@ -4582,7 +4582,7 @@ nautilus_file_operations_copy_move (const GList *item_uris,
gpointer done_callback_data)
{
GList *locations;
GFile *dest;
GFile *dest, *src_dir;
GtkWindow *parent_window;
dest = NULL;
......@@ -4597,7 +4597,10 @@ nautilus_file_operations_copy_move (const GList *item_uris,
}
if (copy_action == GDK_ACTION_COPY) {
if (target_dir == NULL) {
src_dir = g_file_get_parent (locations->data);
if (target_dir == NULL ||
(src_dir != NULL &&
g_file_equal (src_dir, dest))) {
nautilus_file_operations_duplicate (locations,
relative_item_points,
parent_window,
......@@ -4609,6 +4612,9 @@ nautilus_file_operations_copy_move (const GList *item_uris,
parent_window,
done_callback, done_callback_data);
}
if (src_dir) {
g_object_unref (src_dir);
}
} else if (copy_action == GDK_ACTION_MOVE) {
if (g_file_has_uri_scheme (dest, "trash")) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment