updated: [e0aba5d] completion: do not complete dead/broken files as dirs
Sergei Trofimovich
slyfox at inbox.ru
Tue Feb 10 11:49:57 UTC 2009
The following commit has been merged in the master branch:
commit e0aba5d5885358850186f5b1620f4b96383dce99
Author: Sergei Trofimovich <slyfox at inbox.ru>
Date: Sat Feb 7 16:04:36 2009 +0200
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 at inbox.ru>
diff --git a/src/complete.c b/src/complete.c
index 4cf71e1..694b602 100644
--- a/src/complete.c
+++ b/src/complete.c
@@ -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)
--
Midnight Commander Development
More information about the mc-devel
mailing list