From ffbe1addd5a5b7b7c2f987625a5aa6c1d22e3705 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Fri, 6 May 2005 15:45:01 +0200 Subject: [PATCH] fix compare symlink against readlink not data Fix update-cache to compare the blob of a symlink against the link-target and not the file it points to. Also ignore all permissions applied to links. Thanks to Greg for recognizing this while he added our list of symlinks back to the udev repository. Signed-off-by: Kay Sievers 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 0cf2c24410..c51edc3315 100644 --- a/diff-files.c +++ b/diff-files.c @@ -111,7 +111,7 @@ int main(int argc, char **argv) continue; } - if (stat(ce->name, &st) < 0) { + if (lstat(ce->name, &st) < 0) { if (errno != ENOENT) { perror(ce->name); continue; -- cgit 1.2.3-korg