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 /src/util | |
parent | 7ff5a917fd0a91cd03ba61419a57053e4ae17e92 (diff) |
-rw-r--r-- | src/util/testdb.c | 8 |
diff --git a/src/util/testdb.c b/src/util/testdb.c index f354ecab..87bfcf96 100644 --- a/src/util/testdb.c +++ b/src/util/testdb.c @@ -23,7 +23,6 @@ #include <errno.h> #include <limits.h> #include <string.h> -#include <sys/stat.h> #include <dirent.h> #include <libgen.h> @@ -61,7 +60,6 @@ static int db_test(char *dbpath) { struct dirent *ent; char path[PATH_MAX]; - struct stat buf; int ret = 0; DIR *dir; @@ -77,17 +75,17 @@ static int db_test(char *dbpath) } /* check for desc, depends, and files */ snprintf(path, PATH_MAX, "%s/%s/desc", dbpath, ent->d_name); - if(stat(path, &buf)) { + if(access(path, F_OK)) { printf("%s: description file is missing\n", ent->d_name); ret++; } snprintf(path, PATH_MAX, "%s/%s/depends", dbpath, ent->d_name); - if(stat(path, &buf)) { + if(access(path, F_OK)) { printf("%s: dependency file is missing\n", ent->d_name); ret++; } snprintf(path, PATH_MAX, "%s/%s/files", dbpath, ent->d_name); - if(stat(path, &buf)) { + if(access(path, F_OK)) { printf("%s: file list is missing\n", ent->d_name); ret++; } |