как воспроизвести:
- mkdir dir
- cd dir
- rm -rf ../dir
получаем «vfs_path_get_by_index: incorrect index!»
патчик, исправляющий эту лажу
--- mc/src/filemanager/panel.c.orig 2013-06-12 14:01:02.000000000 +0300
+++ mc/src/filemanager/panel.c 2013-07-01 15:37:31.061950371 +0300
@@ -4150,12 +4150,12 @@
do
{
char *last_slash;
- const char *panel_cwd_path;
+ char *panel_cwd_path;
if (mc_chdir (panel->cwd_vpath) != -1)
break;
- panel_cwd_path = vfs_path_as_str (panel->cwd_vpath);
+ panel_cwd_path = g_strdup (vfs_path_as_str (panel->cwd_vpath));
if (panel_cwd_path[0] == PATH_SEP && panel_cwd_path[1] == '\0')
{
@@ -4170,8 +4170,9 @@
else
{
*last_slash = '\0';
- panel->cwd_vpath = vfs_path_clone (panel->cwd_vpath);
+ panel->cwd_vpath = vfs_path_from_str (panel_cwd_path);
}
+ g_free (panel_cwd_path);
memset (&(panel->dir_stat), 0, sizeof (panel->dir_stat));
show_dir (panel);
}