Don't push directory to history twice. Unified error message.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2010-09-09 10:13:05 +04:00
parent dfbe1130d5
commit 51b14f2b7b

View File

@ -1245,10 +1245,8 @@ nice_cd (const char *text, const char *xtext, const char *help,
else else
cd_path = g_strconcat (prefix, machine, to_home ? "/~/" : (char *) NULL, (char *) NULL); cd_path = g_strconcat (prefix, machine, to_home ? "/~/" : (char *) NULL, (char *) NULL);
if (do_panel_cd (MENU_PANEL, cd_path, cd_parse_command)) if (!do_panel_cd (MENU_PANEL, cd_path, cd_parse_command))
directory_history_add (MENU_PANEL, (MENU_PANEL)->cwd); message (D_ERROR, MSG_ERROR, _("Cannot chdir to \"%s\""), cd_path);
else
message (D_ERROR, MSG_ERROR, _("Cannot chdir to %s"), cd_path);
g_free (cd_path); g_free (cd_path);
g_free (machine); g_free (machine);
} }