summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Chantry <shiningxc@gmail.com>2009-07-25 20:00:06 +0200
committerDan McGee <dan@archlinux.org>2009-07-25 17:25:50 -0500
commit6fa5f2075aaffec9b9cc89329461a34e29b5b2a6 (patch)
tree364ab0dbb6260571af720ac4ac4271e9dee04481
parent30c4d53ce5c16cbbb17a88fe1ad14faf53d91999 (diff)
downloadpacman-6fa5f2075aaffec9b9cc89329461a34e29b5b2a6.tar.xz
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>
-rw-r--r--src/pacman/query.c2
1 files changed, 1 insertions, 1 deletions
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++;