diff options
Diffstat (limited to 'src/libstore/gc.cc')
-rw-r--r-- | src/libstore/gc.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libstore/gc.cc b/src/libstore/gc.cc index d19af1cefaf2..1bc8d162f837 100644 --- a/src/libstore/gc.cc +++ b/src/libstore/gc.cc @@ -608,6 +608,9 @@ void LocalStore::collectGarbage(const GCOptions & options, GCResults & results) state.shouldDelete = options.action == GCOptions::gcDeleteDead || options.action == GCOptions::gcDeleteSpecific; + if (state.shouldDelete && pathExists(reservedPath)) + deletePath(reservedPath); + /* Acquire the global GC root. This prevents a) New roots from being added. b) Processes from creating new temporary root files. */ |