1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-27 20:51:00 +01:00

Merged R8864

This commit is contained in:
Wouter den Breejen 2007-10-08 10:26:21 +00:00
parent 854e155b2c
commit 546ca6e8bc
17 changed files with 113 additions and 50 deletions

View file

@ -145,6 +145,15 @@ Database::~Database()
void openEnv(DbEnv * & env, const string & path, u_int32_t flags)
{
try {
createDirs(path);
} catch (SysError & e) {
if (e.errNo == EPERM || e.errNo == EACCES)
throw DbNoPermission(format("cannot create the Nix database in `%1%'") % path);
else
throw;
}
try {
env->open(path.c_str(),
DB_INIT_LOCK | DB_INIT_LOG | DB_INIT_MPOOL | DB_INIT_TXN |