db: allow comments and empty lines in repositories file

cute-signatures
Natanael Copa 2009-01-08 09:12:39 +00:00
parent 174dd41113
commit 08748b5c3f
1 changed files with 4 additions and 0 deletions

View File

@ -730,6 +730,10 @@ int apk_db_add_repository(apk_database_t _db, apk_blob_t repository)
char tmp[256];
int r;
if (repository.ptr == NULL || *repository.ptr == '\0'
|| *repository.ptr == '#')
return 0;
if (db->num_repos >= APK_MAX_REPOS)
return -1;