From d8fab9b4415b2382c9b5d92f6d0d40074ab65f30 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 27 Sep 2011 17:36:31 -0500 Subject: 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 --- lib/libalpm/be_sync.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'lib') 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 */ -- cgit v1.2.3-70-g09d2