diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2009-01-08 09:12:39 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2009-01-08 09:12:39 +0000 |
commit | 08748b5c3ff76804b21b4ff6d1d0c2c587f3f59c (patch) | |
tree | d6cc223705b32e5b9666ee05788d7f35d52ca941 /src/database.c | |
parent | 174dd41113da46bb4bb920326bd8824cec8fad84 (diff) | |
download | apk-tools-08748b5c3ff76804b21b4ff6d1d0c2c587f3f59c.tar.gz apk-tools-08748b5c3ff76804b21b4ff6d1d0c2c587f3f59c.tar.bz2 apk-tools-08748b5c3ff76804b21b4ff6d1d0c2c587f3f59c.tar.xz apk-tools-08748b5c3ff76804b21b4ff6d1d0c2c587f3f59c.zip |
db: allow comments and empty lines in repositories file
Diffstat (limited to 'src/database.c')
-rw-r--r-- | src/database.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/database.c b/src/database.c index 18bf290..676d086 100644 --- a/src/database.c +++ b/src/database.c @@ -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; |