index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dan McGee <dan@archlinux.org> | 2011-08-17 21:06:04 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-08-18 10:47:41 -0500 |
commit | c885a953eb888004f0302ed3eceafef93e2f072f (patch) | |
tree | 676e9d86361ba8af989d8f8277db58e261471518 /lib/libalpm/db.c | |
parent | 4a7f3bbc469d1f6a8da1c7f310ab518ad841c2b9 (diff) |
-rw-r--r-- | lib/libalpm/db.c | 8 |
diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c index ad5f0bc1..8a235e21 100644 --- a/lib/libalpm/db.c +++ b/lib/libalpm/db.c @@ -326,7 +326,11 @@ alpm_db_t *_alpm_db_new(const char *treename, int is_local) CALLOC(db, 1, sizeof(alpm_db_t), return NULL); STRDUP(db->treename, treename, return NULL); - db->is_local = is_local; + if(is_local) { + db->status |= DB_STATUS_LOCAL; + } else { + db->status &= ~DB_STATUS_LOCAL; + } return db; } @@ -359,7 +363,7 @@ const char *_alpm_db_path(alpm_db_t *db) RET_ERR(db->handle, ALPM_ERR_DB_OPEN, NULL); } - if(db->is_local) { + if(db->status & DB_STATUS_LOCAL) { pathsize = strlen(dbpath) + strlen(db->treename) + 2; CALLOC(db->_path, 1, pathsize, RET_ERR(db->handle, ALPM_ERR_MEMORY, NULL)); sprintf(db->_path, "%s%s/", dbpath, db->treename); |