From 0ac4d17dd9dd77c5d227c97cef3e0fc104ee9d5a Mon Sep 17 00:00:00 2001 From: Miguel de Icaza Date: Wed, 1 Sep 1999 19:28:57 +0000 Subject: [PATCH] 1999-09-01 Federico Mena Quintero * gscreen.c (panel_icon_renamed): Do nothing if the name did not change. --- gnome/ChangeLog | 5 +++++ gnome/gscreen.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gnome/ChangeLog b/gnome/ChangeLog index 6eebc6658..6c8543f90 100644 --- a/gnome/ChangeLog +++ b/gnome/ChangeLog @@ -1,3 +1,8 @@ +1999-09-01 Federico Mena Quintero + + * gscreen.c (panel_icon_renamed): Do nothing if the name did not + change. + 1999-08-30 Federico Mena Quintero * gdnd.c (file_has_drop_action): New function to test whether a diff --git a/gnome/gscreen.c b/gnome/gscreen.c index aa210cbe3..faefc1a26 100644 --- a/gnome/gscreen.c +++ b/gnome/gscreen.c @@ -1464,7 +1464,10 @@ panel_icon_renamed (GtkWidget *widget, int index, char *dest, WPanel *panel) char *fullname; int retval; - source = g_concat_dir_and_file (cpanel->cwd, panel->dir.list [index].fname); + if (strcmp (dest, panel->dir.list[index].fname) == 0) + return TRUE; /* do nothing if the name did not change */ + + source = g_concat_dir_and_file (cpanel->cwd, panel->dir.list[index].fname); fullname = g_concat_dir_and_file (cpanel->cwd, dest); if (rename_file_with_context (source, dest) == FILE_CONT) {