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:
parent
8fe383860e
commit
c5e7eeece7
1 changed files with 2 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue