index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Chantry Xavier <shiningxc@gmail.com> | 2007-07-02 00:57:47 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2007-07-01 22:32:18 -0400 |
commit | 89ed15c9c2dd5449d50e5ec2283a4d6ebac5f328 (patch) | |
tree | c021c1221d15c4a7e98226aaf473af781152ef72 | |
parent | 7a42e24400499873c3b9e1e2315edc808d753734 (diff) |
-rw-r--r-- | src/pacman/package.c | 11 |
diff --git a/src/pacman/package.c b/src/pacman/package.c index c91384d9..a30260ae 100644 --- a/src/pacman/package.c +++ b/src/pacman/package.c @@ -26,6 +26,7 @@ #include <string.h> #include <limits.h> #include <sys/stat.h> +#include <errno.h> #include <alpm.h> #include <alpm_list.h> @@ -222,14 +223,18 @@ void dump_pkg_files(pmpkg_t *pkg) filestr = (char*)alpm_list_getdata(i); /* build a path so we can stat the filename */ snprintf(path, PATH_MAX-1, "%s%s", root, filestr); - if(!stat(path, &buf) && S_ISDIR(buf.st_mode)) { - /* if we stat it and it is a dir, don't print */ + if(!lstat(path, &buf)) { + if(!S_ISDIR(buf.st_mode)) { + /* don't print directories */ + fprintf(stdout, "%s %s\n", pkgname, path); + } } else { - fprintf(stdout, "%s %s\n", pkgname, path); + fprintf(stderr, "%s %s : %s\n", pkgname, path, strerror(errno)); } } fflush(stdout); + fflush(stderr); } /* Display the changelog of an installed package |