mc/mc-newlinedir.patch
Jindrich Novy 2b750a0dac - update to new CVS snapshot
- drop .fishfix, .rpmconf patches, applied upstream
- fix IPv6 patch (should fix #206234 and #213212)
- don't crash when directory ending with newline is listed (#215909),
    disable support for directories with '\n' in name to avoid further
    issues (remove .uglydir patch) and report chdir error
2006-11-20 14:08:49 +00:00

12 lines
405 B
Diff

--- mc-2006-11-14-16/src/main.c.newlinedir 2006-11-20 14:54:21.000000000 +0100
+++ mc-2006-11-14-16/src/main.c 2006-11-20 14:47:52.000000000 +0100
@@ -647,7 +647,7 @@
}
directory = *new_dir ? new_dir : home_dir;
- if (mc_chdir (directory) == -1) {
+ if (strchr(directory,'\n') || mc_chdir (directory) == -1) {
strcpy (panel->cwd, olddir);
g_free (olddir);
g_free (translated_url);