index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Andrew Gregory <andrew.gregory.8@gmail.com> | 2014-04-26 19:24:55 -0400 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2014-05-04 16:14:44 +1000 |
commit | dd694f433b0848a04ae72e771086b1bcd8b9a4e9 (patch) | |
tree | 1e5b2406a5be2eb1cfd43709f0bc9d80a2981b09 | |
parent | 5293d5784049869c965ee21f424b8845bdebb745 (diff) |
-rw-r--r-- | lib/libalpm/db.c | 3 |
diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c index b9cbed76..466c96f1 100644 --- a/lib/libalpm/db.c +++ b/lib/libalpm/db.c @@ -52,12 +52,13 @@ alpm_db_t SYMEXPORT *alpm_register_syncdb(alpm_handle_t *handle, CHECK_HANDLE(handle, return NULL); ASSERT(treename != NULL && strlen(treename) != 0, RET_ERR(handle, ALPM_ERR_WRONG_ARGS, NULL)); + ASSERT(!strchr(treename, '/'), RET_ERR(handle, ALPM_ERR_WRONG_ARGS, NULL)); /* Do not register a database if a transaction is on-going */ ASSERT(handle->trans == NULL, RET_ERR(handle, ALPM_ERR_TRANS_NOT_NULL, NULL)); /* ensure database name is unique */ if(strcmp(treename, "local") == 0) { - RET_ERR(handle, ALPM_ERR_DB_NOT_NULL, NULL); + RET_ERR(handle, ALPM_ERR_DB_NOT_NULL, NULL); } for(i = handle->dbs_sync; i; i = i->next) { alpm_db_t *d = i->data; |