about summary refs log tree commit diff
path: root/src/nix-store/nix-store.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-08-01T23·14-0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-08-01T23·14-0400
commit967d066d8e452e59507ebae7585d6f34a4edf687 (patch)
tree15607d4c9389a274dda1ce659a41e10b06c98f12 /src/nix-store/nix-store.cc
parent1df702d34733e69599a6ae21cb366348a2534b7d (diff)
nix-store --gc: Make ‘--max-freed 0’ do the right thing
That is, delete almost nothing (it will still remove unused links from
/nix/store/.links).
Diffstat (limited to 'src/nix-store/nix-store.cc')
-rw-r--r--src/nix-store/nix-store.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc
index 82e08fecf22a..9a675fcd576a 100644
--- a/src/nix-store/nix-store.cc
+++ b/src/nix-store/nix-store.cc
@@ -583,7 +583,7 @@ static void opGC(Strings opFlags, Strings opArgs)
         else if (*i == "--delete") options.action = GCOptions::gcDeleteDead;
         else if (*i == "--max-freed") {
             long long maxFreed = getIntArg<long long>(*i, i, opFlags.end());
-            options.maxFreed = maxFreed >= 1 ? maxFreed : 1;
+            options.maxFreed = maxFreed >= 0 ? maxFreed : 0;
         }
         else throw UsageError(format("bad sub-operation `%1%' in GC") % *i);