From 9d9ac66bb26df7ace59d5c441679a6f2a17d116d Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Fri, 18 May 2007 01:19:00 -0500 Subject: Continue scanning when an invalid DB entry is found Fix for FS#7133 - when DB scanning finds an invalid named entry, scanning is currently aborted. Instead we will simply skip it and find the next valid package. Signed-off-by: Aaron Griffin --- lib/libalpm/be_files.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/libalpm/be_files.c b/lib/libalpm/be_files.c index d720268f..ed2e9207 100644 --- a/lib/libalpm/be_files.c +++ b/lib/libalpm/be_files.c @@ -183,7 +183,9 @@ pmpkg_t *_alpm_db_scan(pmdb_t *db, const char *target) } if(_alpm_pkg_splitname(ent->d_name, pkg->name, pkg->version, 0) == -1) { _alpm_log(PM_LOG_ERROR, _("invalid name for database entry '%s'"), ent->d_name); - return(NULL); + alpm_pkg_free(pkg); + pkg = NULL; + continue; } /* explicitly read with only 'BASE' data, accessors will handle the rest */ -- cgit v1.2.3-70-g09d2