mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-11 03:54:59 -05: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:
parent
8fe383860e
commit
c5e7eeece7
@ -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 */
|
/* attempt to hand back any memory we don't need */
|
||||||
files = realloc(files, sizeof(alpm_file_t) * files_count);
|
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.count = files_count;
|
||||||
info->files.files = files;
|
info->files.files = files;
|
||||||
} else if(strcmp(line, "%BACKUP%") == 0) {
|
} else if(strcmp(line, "%BACKUP%") == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user