mirror of
https://github.com/NixOS/nix.git
synced 2024-11-25 08:12:29 +00:00
NarInfoDiskCacheImpl: Make dbPath a parameter
This allows testing with a clean database.
This commit is contained in:
parent
29f0b196f4
commit
79f62d2dda
@ -84,11 +84,10 @@ public:
|
||||
|
||||
Sync<State> _state;
|
||||
|
||||
NarInfoDiskCacheImpl()
|
||||
NarInfoDiskCacheImpl(Path dbPath = getCacheDir() + "/nix/binary-cache-v6.sqlite")
|
||||
{
|
||||
auto state(_state.lock());
|
||||
|
||||
Path dbPath = getCacheDir() + "/nix/binary-cache-v6.sqlite";
|
||||
createDirs(dirOf(dbPath));
|
||||
|
||||
state->db = SQLite(dbPath);
|
||||
|
Loading…
Reference in New Issue
Block a user