1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00

lib/be_local: ensure local filelists are sorted

This may very well be a no-op, but better safe than sorry.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dave Reisner 2012-07-12 14:50:56 -04:00 committed by Dan McGee
parent 8fe383860e
commit c5e7eeece7

View File

@ -688,6 +688,8 @@ static int local_db_read(alpm_pkg_t *info, alpm_dbinfrq_t inforeq)
}
/* attempt to hand back any memory we don't need */
files = realloc(files, sizeof(alpm_file_t) * files_count);
/* make sure the list is sorted */
qsort(files, files_count, sizeof(alpm_file_t), _alpm_files_cmp);
info->files.count = files_count;
info->files.files = files;
} else if(strcmp(line, "%BACKUP%") == 0) {