From 411746940f02f6fb90c4b6b97c6f07cee599c2e1 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 20 May 2005 09:48:38 -0700 Subject: [PATCH] Diff-files fix with more tests. The same check we added earlier to update-cache to catch ENOTDIR turns out to be missing from diff-files. This causes a difference not being reported when you have DF/DF (a file in a subdirectory) in the cache and DF is a file on the filesystem. Signed-off-by: Junio C Hamano Signed-off-by: Linus Torvalds --- diff-files.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'diff-files.c') diff --git a/diff-files.c b/diff-files.c index 414b36ec90..eb99c3cf09 100644 --- a/diff-files.c +++ b/diff-files.c @@ -108,7 +108,7 @@ int main(int argc, char **argv) } if (lstat(ce->name, &st) < 0) { - if (errno != ENOENT) { + if (errno != ENOENT && errno != ENOTDIR) { perror(ce->name); continue; } -- cgit v1.2.1