summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-11-04 10:41:29 +0100
committerLudovic Courtès <ludo@gnu.org>2015-05-11 17:39:01 +0200
commit86b9e6d4575e5c93f428b8563ae259f0f4014173 (patch)
treec43b04493c278e1735bb78203bab2c4068e0bebc
parent1129a982c4e77ff465fd6102627477900af2f7f4 (diff)
downloadguix-86b9e6d4575e5c93f428b8563ae259f0f4014173.tar.gz
nix-store --gc: Don't warn about missing manifests directory
-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;