summaryrefslogtreecommitdiff
path: root/src/nautilus-file-conflict-dialog.c
diff options
context:
space:
mode:
authorecho-devim <devim@outlook.it>2017-03-15 18:05:36 +0100
committerCarlos Soriano <csoriano@gnome.org>2017-03-22 16:09:51 +0100
commit64f16e19c0dea88e9a992122904d104ecca8b954 (patch)
tree252a4134cce2d08b608727e1eeb353d7c49a54ec /src/nautilus-file-conflict-dialog.c
parent80d796b5aa5060124500b706666530c48e21d6e5 (diff)
downloadnautilus-64f16e19c0dea88e9a992122904d104ecca8b954.tar.gz
file-conflict-dialog: Prevent replacing a directory with a symbolic link
If the user tries to replace a folder with a symbolic link with the same name,the content of the destination folder was being deleted. To fix this behaviour, the UI disables the replace button allowing the user only to skip or to rename in order to avoid the deletion of the destination folder's content. https://bugzilla.gnome.org/show_bug.cgi?id=632323
Diffstat (limited to 'src/nautilus-file-conflict-dialog.c')
-rw-r--r--src/nautilus-file-conflict-dialog.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nautilus-file-conflict-dialog.c b/src/nautilus-file-conflict-dialog.c
index 55e536692..62eafd1ec 100644
--- a/src/nautilus-file-conflict-dialog.c
+++ b/src/nautilus-file-conflict-dialog.c
@@ -153,6 +153,12 @@ nautilus_file_conflict_dialog_disable_skip (NautilusFileConflictDialog *fcd)
}
void
+nautilus_file_conflict_dialog_disable_replace (NautilusFileConflictDialog *fcd)
+{
+ gtk_widget_set_sensitive (fcd->replace_button, FALSE);
+}
+
+void
nautilus_file_conflict_dialog_disable_apply_to_all (NautilusFileConflictDialog *fcd)
{
gtk_widget_hide (fcd->checkbox);