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

Rename ReadOnly to Immutable and clarify its purpose.

This commit is contained in:
Ben Radford 2023-05-16 15:48:40 +01:00
parent aa376f4ab1
commit b1a7b26eef
No known key found for this signature in database
GPG key ID: 9DF5D4640AB888D5
3 changed files with 9 additions and 7 deletions

View file

@ -490,7 +490,7 @@ void LocalStore::openDB(State & state, bool create)
/* Open the Nix database. */
std::string dbPath = dbDir + "/db.sqlite";
auto & db(state.db);
auto openMode = readOnly ? SQLiteOpenMode::ReadOnly
auto openMode = readOnly ? SQLiteOpenMode::Immutable
: create ? SQLiteOpenMode::Normal
: SQLiteOpenMode::NoCreate;
state.db = SQLite(dbPath, openMode);