Code

Fix off-by-one in read_tree_recursive
[git.git] / diff-no-index.c
index a3e47a76e401a1b98891b15a406b5806a294af3d..7273a7a0b648cc8cbd6dce2043a6e544b87d28b6 100644 (file)
@@ -40,7 +40,7 @@ static int get_mode(const char *path, int *mode)
                *mode = 0;
        else if (!strcmp(path, "-"))
                *mode = create_ce_mode(0666);
-       else if (stat(path, &st))
+       else if (lstat(path, &st))
                return error("Could not access '%s'", path);
        else
                *mode = st.st_mode;