From 6fa5f2075aaffec9b9cc89329461a34e29b5b2a6 Mon Sep 17 00:00:00 2001 From: Xavier Chantry Date: Sat, 25 Jul 2009 20:00:06 +0200 Subject: 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 Signed-off-by: Dan McGee --- src/pacman/query.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/pacman') diff --git a/src/pacman/query.c b/src/pacman/query.c index 23be7524..32752ffb 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++; -- cgit v1.2.3-70-g09d2