summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--nix/libstore/gc.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/nix/libstore/gc.cc b/nix/libstore/gc.cc
index 05d332f2a1..2a53b54110 100644
--- a/nix/libstore/gc.cc
+++ b/nix/libstore/gc.cc
@@ -355,7 +355,8 @@ Roots LocalStore::findRoots()
 
     /* Process direct roots in {gcroots,manifests,profiles}. */
     nix::findRoots(*this, settings.nixStateDir + "/" + gcRootsDir, DT_UNKNOWN, roots);
-    nix::findRoots(*this, settings.nixStateDir + "/manifests", DT_UNKNOWN, roots);
+    if (pathExists(settings.nixStateDir + "/manifests"))
+        nix::findRoots(*this, settings.nixStateDir + "/manifests", DT_UNKNOWN, roots);
     nix::findRoots(*this, settings.nixStateDir + "/profiles", DT_UNKNOWN, roots);
 
     return roots;