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 <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Xavier Chantry 2009-07-25 20:00:06 +02:00 committed by Dan McGee
parent 30c4d53ce5
commit 6fa5f2075a
1 changed files with 1 additions and 1 deletions

View File

@ -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++;