mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 21:06:52 +03:00
Don't push directory to history twice. Unified error message.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
dfbe1130d5
commit
51b14f2b7b
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user