aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/gc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/gc.cc')
-rw-r--r--src/libstore/gc.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstore/gc.cc b/src/libstore/gc.cc
index 552016584..b5cc21de4 100644
--- a/src/libstore/gc.cc
+++ b/src/libstore/gc.cc
@@ -482,7 +482,7 @@ void LocalStore::gcPath(const GCOptions & options, GCResults & results,
results.bytesFreed += bytesFreed;
results.blocksFreed += blocksFreed;
- if (results.bytesFreed > options.maxFreed) {
+ if (options.maxFreed && results.bytesFreed > options.maxFreed) {
printMsg(lvlInfo, format("deleted more than %1% bytes; stopping") % options.maxFreed);
throw GCLimitReached();
}