1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 05:21:16 +02:00

Merge pull request #1333 from copumpkin/fix-schema-version

Ensure that curSchema is set before opening the DB
This commit is contained in:
Eelco Dolstra 2017-04-14 20:58:06 +02:00 committed by GitHub
commit 1ab5cc0f5a

View file

@ -225,6 +225,7 @@ LocalStore::LocalStore(bool reserveSpace)
schemaPath = settings.nixDBPath + "/schema";
if (settings.readOnlyMode) {
curSchema = getSchema();
openDB(false);
return;
}
@ -309,6 +310,7 @@ LocalStore::LocalStore(bool reserveSpace)
} catch (SysError & e) {
if (e.errNo != EACCES) throw;
settings.readOnlyMode = true;
curSchema = getSchema();
openDB(false);
return;
}