diff --git a/diff-no-index.c b/diff-no-index.c
index 60ed17470a6a2bf9bea202a04004b06d207a77d7..0dbd9dad8b100cdd4918571636ad3e9a1a0a2abf 100644 (file)
--- a/diff-no-index.c
+++ b/diff-no-index.c
*mode = 0;
else if (!strcmp(path, "-"))
*mode = create_ce_mode(0666);
*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;
return error("Could not access '%s'", path);
else
*mode = st.st_mode;