[nautilus: 1/2] window-slot-dnd: fix drop condition check
- From: Carlos Soriano <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus: 1/2] window-slot-dnd: fix drop condition check
- Date: Mon, 1 Jan 2018 21:14:42 +0000 (UTC)
commit 0a7b7977e59a7b2c062e0b18a9cab928ece28976
Author: Alexandru Pandelea <alexandru pandelea gmail com>
Date: Fri Dec 22 23:41:20 2017 +0200
window-slot-dnd: fix drop condition check
Drag and dropping on a search or starred location tab gives an error dialog
that says "Error while copying to /".
In order to be able to drop the selection on a target it is also necessary
to check whether it is editable, property which is set False for the Star
and Search directories.
https://gitlab.gnome.org/GNOME/nautilus/issues/168
src/nautilus-window-slot-dnd.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/nautilus-window-slot-dnd.c b/src/nautilus-window-slot-dnd.c
index b8dd87a07..dede5dc1f 100644
--- a/src/nautilus-window-slot-dnd.c
+++ b/src/nautilus-window-slot-dnd.c
@@ -220,9 +220,12 @@ slot_proxy_drag_motion (GtkWidget *widget,
if (target_uri != NULL)
{
NautilusFile *file;
+ NautilusDirectory *directory;
gboolean can;
file = nautilus_file_get_existing_by_uri (target_uri);
- can = nautilus_file_can_write (file);
+ directory = nautilus_directory_get_for_file (file);
+ can = nautilus_file_can_write (file) && nautilus_directory_is_editable (directory);
+ nautilus_directory_unref (directory);
g_object_unref (file);
if (!can)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]