completion: do not complete dead/broken files as dirs

When we try to complete something what can't be stat()'ed,
we treated it like dir. Now we do not consider such candidates
for completion.

Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
This commit is contained in:
Sergei Trofimovich 2009-02-07 16:04:36 +02:00
parent 8bd883085f
commit e0aba5d588

View File

@ -155,6 +155,11 @@ filename_completion_function (char *text, int state, INPUT_COMPLETE_FLAGS flags)
isexec = 1;
}
}
else
{
// stat failed, strange. not a dir in any case
isdir = 0;
}
g_free (tmp);
}
if ((flags & INPUT_COMPLETE_COMMANDS)