summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-09-27 17:36:31 -0500
committerDan McGee <dan@archlinux.org>2011-09-27 17:49:34 -0500
commitd8fab9b4415b2382c9b5d92f6d0d40074ab65f30 (patch)
treee6ef9eab11498ec5cf2fa22c088b9d19839b2a6a
parentbf56fb6eb82b732900c32cbf375f7910ac479d98 (diff)
be_sync: fetch only entry mode, not full stat struct
This saves a lot of unnecessary work since we don't need any of the other fields in the stat struct. Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--lib/libalpm/be_sync.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c
index 4864616b..53777d92 100644
--- a/lib/libalpm/be_sync.c
+++ b/lib/libalpm/be_sync.c
@@ -454,11 +454,8 @@ static int sync_db_populate(alpm_db_t *db)
}
while(archive_read_next_header(archive, &entry) == ARCHIVE_OK) {
- const struct stat *st;
-
- st = archive_entry_stat(entry);
-
- if(S_ISDIR(st->st_mode)) {
+ mode_t mode = archive_entry_mode(entry);
+ if(S_ISDIR(mode)) {
continue;
} else {
/* we have desc, depends or deltas - parse it */