summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorey Berla <corey@berla.me>2022-07-03 13:27:37 -0700
committerAntónio Fernandes <antoniof@gnome.org>2022-07-07 22:10:56 +0100
commit1910f670593e83f456b6f0330aff816b8e7ce5ef (patch)
tree3bc498019ea5f834efbb8755d8e35949a9f404b7
parent63ac416c014e7cc7d052bd62a59b4e5908f0f5a2 (diff)
downloadnautilus-1910f670593e83f456b6f0330aff816b8e7ce5ef.tar.gz
dnd: Only allow drop to writable directory
-rw-r--r--src/nautilus-dnd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nautilus-dnd.c b/src/nautilus-dnd.c
index d13136946..3bdf1f68b 100644
--- a/src/nautilus-dnd.c
+++ b/src/nautilus-dnd.c
@@ -172,7 +172,8 @@ nautilus_dnd_get_preferred_action (NautilusFile *target_file,
{
return GDK_ACTION_COPY;
}
- else if (!nautilus_file_is_directory (target_file))
+ else if (!nautilus_file_is_directory (target_file) ||
+ !nautilus_file_can_write (target_file))
{
/* No other file type other than archives and directories currently
* accepts drops */