[nautilus/wip/csoriano/renaming: 10/14] view: make "." and ".." as file names invalid
- From: Carlos Soriano Sánchez <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/csoriano/renaming: 10/14] view: make "." and ".." as file names invalid
- Date: Wed, 22 Apr 2015 11:57:32 +0000 (UTC)
commit 0004e583050ac199dd8c0eb54b28b1f32625286c
Author: Carlos Soriano <csoriano gnome org>
Date: Tue Apr 21 15:15:38 2015 +0200
view: make "." and ".." as file names invalid
src/nautilus-view.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/nautilus-view.c b/src/nautilus-view.c
index e06da3f..5f18d36 100644
--- a/src/nautilus-view.c
+++ b/src/nautilus-view.c
@@ -1697,6 +1697,16 @@ nautilus_view_validate_file_name (FileNameDialogData *data)
gtk_label_set_label (GTK_LABEL (data->error_label), _("Folder names cannot contain
“/”."));
else
gtk_label_set_label (GTK_LABEL (data->error_label), _("Files names cannot contain
“/”."));
+ } else if (strcmp (name, ".") == 0){
+ if (data->target_is_folder)
+ gtk_label_set_label (GTK_LABEL (data->error_label), _("A folder can not be called
“.”."));
+ else
+ gtk_label_set_label (GTK_LABEL (data->error_label), _("A file can not be called
“.”."));
+ } else if (strcmp (name, "..") == 0){
+ if (data->target_is_folder)
+ gtk_label_set_label (GTK_LABEL (data->error_label), _("A folder can not be called
“..”."));
+ else
+ gtk_label_set_label (GTK_LABEL (data->error_label), _("A file can not be called
“..”."));
} else {
/* No errors detected, empty the label */
gtk_label_set_label (GTK_LABEL (data->error_label), NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]