1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-21 09:49:36 +01:00

SQLite: Use std::filesystem::path

This commit is contained in:
Eelco Dolstra 2025-07-22 11:47:52 +02:00
parent 349d2c58e5
commit 4ab8ff5b4c
4 changed files with 7 additions and 7 deletions

View file

@ -483,12 +483,11 @@ void LocalStore::openDB(State & state, bool create)
throw SysError("Nix database directory '%1%' is not writable", dbDir);
/* Open the Nix database. */
std::string dbPath = dbDir + "/db.sqlite";
auto & db(state.db);
auto openMode = config->readOnly ? SQLiteOpenMode::Immutable
: create ? SQLiteOpenMode::Normal
: SQLiteOpenMode::NoCreate;
state.db = SQLite(dbPath, openMode);
state.db = SQLite(std::filesystem::path(dbDir) / "db.sqlite", openMode);
#ifdef __CYGWIN__
/* The cygwin version of sqlite3 has a patch which calls