diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-05-30T02·59-0400 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-05-30T02·59-0400 |
commit | 4bc4da331aae13be8a39e768524a854597addd8a (patch) | |
tree | 5fccb805c1d27bd82c935f87a97f1a6cd3b29176 /src/nix-store/nix-store.cc | |
parent | 2c26985835cf82ed5d2979c3a400f72f6aeba32f (diff) |
Reserve some disk space for the garbage collector
We can't open a SQLite database if the disk is full. Since this prevents the garbage collector from running when it's most needed, we reserve some dummy space that we can free just before doing a garbage collection. This actually revives some old code from the Berkeley DB days. Fixes #27.
Diffstat (limited to 'src/nix-store/nix-store.cc')
-rw-r--r-- | src/nix-store/nix-store.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc index fa96725b1b48..36c04168259c 100644 --- a/src/nix-store/nix-store.cc +++ b/src/nix-store/nix-store.cc @@ -843,7 +843,7 @@ void run(Strings args) if (!op) throw UsageError("no operation specified"); if (op != opDump && op != opRestore) /* !!! hack */ - store = openStore(); + store = openStore(op != opGC); op(opFlags, opArgs); } |