mirror of
https://github.com/NixOS/nix
synced 2025-07-07 22:33:57 +02:00
NarInfoDiskCacheImpl: Make dbPath a parameter
This allows testing with a clean database.
(cherry picked from commit 79f62d2dda
)
This commit is contained in:
parent
7a67baf951
commit
80498bd923
1 changed files with 1 additions and 2 deletions
|
@ -84,11 +84,10 @@ public:
|
||||||
|
|
||||||
Sync<State> _state;
|
Sync<State> _state;
|
||||||
|
|
||||||
NarInfoDiskCacheImpl()
|
NarInfoDiskCacheImpl(Path dbPath = getCacheDir() + "/nix/binary-cache-v6.sqlite")
|
||||||
{
|
{
|
||||||
auto state(_state.lock());
|
auto state(_state.lock());
|
||||||
|
|
||||||
Path dbPath = getCacheDir() + "/nix/binary-cache-v6.sqlite";
|
|
||||||
createDirs(dirOf(dbPath));
|
createDirs(dirOf(dbPath));
|
||||||
|
|
||||||
state->db = SQLite(dbPath);
|
state->db = SQLite(dbPath);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue