[nautilus] dnd: Only allow drop to writable directory
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] dnd: Only allow drop to writable directory
- Date: Thu, 7 Jul 2022 22:43:47 +0000 (UTC)
commit 1910f670593e83f456b6f0330aff816b8e7ce5ef
Author: Corey Berla <corey berla me>
Date: Sun Jul 3 13:27:37 2022 -0700
dnd: Only allow drop to writable directory
src/nautilus-dnd.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
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 */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]