diff --git a/diff-no-index.c b/diff-no-index.c
index a3e47a76e401a1b98891b15a406b5806a294af3d..42c1dd8ad3b0633767bf577975a895722f882565 100644 (file)
--- a/diff-no-index.c
+++ b/diff-no-index.c
if (!path || !strcmp(path, "/dev/null"))
*mode = 0;
+#ifdef _WIN32
+ else if (!strcasecmp(path, "nul"))
+ *mode = 0;
+#endif
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;