mc/mc-newlinedir.patch

13 lines
505 B
Diff
Raw Normal View History

diff -up mc-4.6.2/src/main.c.newlinedir mc-4.6.2/src/main.c
--- mc-4.6.2/src/main.c.newlinedir 2009-05-26 15:55:43.000000000 +0200
+++ mc-4.6.2/src/main.c 2009-05-26 15:56:47.000000000 +0200
@@ -640,7 +640,7 @@ _do_panel_cd (WPanel *panel, const char
directory = *new_dir ? new_dir : home_dir;
ret_panel=panel;
- if (mc_chdir (directory) == -1) {
+ if (strchr(directory,'\n') || mc_chdir (directory) == -1) {
strcpy (panel->cwd, olddir);
g_free (olddir);
g_free (translated_url);