From 3d47690b358752142842f536d93751dbb78b4941 Mon Sep 17 00:00:00 2001 From: Xavier Chantry Date: Sat, 25 Jul 2009 20:00:06 +0200 Subject: [PATCH 2/2] Use lstat instead of stat for -Qo This fixes: FS#15675 - pacman can not determine ownership of dangling symlinks Using lstat seems more correct than stat for the -Qo operation anyway. Signed-off-by: Xavier Chantry --- src/pacman/query.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/pacman/query.c b/src/pacman/query.c index 23be752..32752ff 100644 --- a/src/pacman/query.c +++ b/src/pacman/query.c @@ -75,7 +75,7 @@ static int query_fileowner(alpm_list_t *targets) struct stat buf; alpm_list_t *i, *j; - if(stat(filename, &buf) == -1) { + if(lstat(filename, &buf) == -1) { pm_fprintf(stderr, PM_LOG_ERROR, _("failed to read file '%s': %s\n"), filename, strerror(errno)); ret++; -- 1.6.3.3