index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dan McGee <dan@archlinux.org> | 2008-06-15 19:15:36 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2008-06-15 22:52:27 -0500 |
commit | 29bf6814f74096e5d8ea22058e638eb362717b8a (patch) | |
tree | 1b608ba8071c1c7e52808a4b178ba8225ef6d2b1 /lib/libalpm/be_files.c | |
parent | 7ff5a917fd0a91cd03ba61419a57053e4ae17e92 (diff) |
-rw-r--r-- | lib/libalpm/be_files.c | 5 |
diff --git a/lib/libalpm/be_files.c b/lib/libalpm/be_files.c index 12c60b24..f5d4e826 100644 --- a/lib/libalpm/be_files.c +++ b/lib/libalpm/be_files.c @@ -355,7 +355,6 @@ static char *get_pkgpath(pmdb_t *db, pmpkg_t *info) int _alpm_db_read(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq) { FILE *fp = NULL; - struct stat buf; char path[PATH_MAX]; char line[513]; char *pkgpath = NULL; @@ -393,7 +392,7 @@ int _alpm_db_read(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq) pkgpath = get_pkgpath(db, info); - if(stat(pkgpath, &buf)) { + if(access(pkgpath, F_OK)) { /* directory doesn't exist or can't be opened */ _alpm_log(PM_LOG_DEBUG, "cannot find '%s-%s' in db '%s'\n", info->name, info->version, db->treename); @@ -631,7 +630,7 @@ int _alpm_db_read(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq) /* INSTALL */ if(inforeq & INFRQ_SCRIPTLET) { snprintf(path, PATH_MAX, "%sinstall", pkgpath); - if(!stat(path, &buf)) { + if(access(path, F_OK) == 0) { info->scriptlet = 1; } } |