The following commit has been merged in the master branch:
commit e0aba5d5885358850186f5b1620f4b96383dce99
Author: Sergei Trofimovich <sly...@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 <sly...@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
_______________________________________________
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel

Reply via email to