Be more careful about tree entry modes.
[gitweb.git] / ls-files.c
index 8b53f2fd52fb3ff30393dac7d00707e76ad96aa4..58b5aee94ee76c9201c580d271fcb6aaf20d421f 100644 (file)
@@ -199,7 +199,7 @@ static void show_files(void)
                        struct stat st;
                        if (excluded(ce->name) != show_ignored)
                                continue;
-                       if (!stat(ce->name, &st))
+                       if (!lstat(ce->name, &st))
                                continue;
                        printf("%s%c", ce->name, line_terminator);
                }